View Single Post
Old 06-30-2012, 05:27 PM   #13
mmatej
Connoisseur
mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.mmatej is less competitive than you.
 
Posts: 91
Karma: 14730
Join Date: Jun 2012
Device: none
Here's small auto-rotate script I've created:
Code:
#!/bin/sh
mount /dev/mmcblk0p2 /mnt/mmc
insmod /mnt/mmc/lib/modules/2.6.31-rt11-lab126/kernel/drivers/hwmon/hwmon.ko
insmod /mnt/mmc/lib/modules/2.6.31-rt11-lab126/kernel/arch/arm/mach-mx5/mx50_yoshi_mma8453.ko
umount /dev/mmcblk0p2
echo mma8453 0x1c > /sys/devices/virtual/i2c-adapter/i2c-0/new_device
while true; do
ROTATION=`hexdump -n16 /dev/input/event4|line|cut -f7 -d' '|cut -c4`;
[ "$ROTATION" == "b" ] && SET_TO='U';
[ "$ROTATION" == "c" ] && SET_TO='D';
[ "$ROTATION" == "d" ] && SET_TO='L';
[ "$ROTATION" == "e" ] && SET_TO='R';
lipc-set-prop com.lab126.winmgr orientationLock "$SET_TO";
done
Maybe someone will find it useful.
mmatej is offline   Reply With Quote