scottrcarlson / opendoom

Automatically exported from code.google.com/p/opendoom
GNU General Public License v2.0
0 stars 0 forks source link

Accelerometer Threshold Adjustment #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

 Recent changes to the accelerometer drivers  (assumed) has affected the
gameplay, to fix

echo 10 > /sys/devices/platform/lis302dl.1/threshold
echo 10 > /sys/devices/platform/lis302dl.2/threshold

this should be written to .profile when installed.

Original issue reported on code.google.com by scottrca...@gmail.com on 7 Dec 2008 at 7:04

GoogleCodeExporter commented 9 years ago
.profile should not be changed as it will break other applications that use the 
accelerometer
(for example MooCow). Instead, I changed the dm script to look like this:
# Swap the commented out lines if you want to run via ssh

#export DISPLAY=:0
#xrandr -display :0 -s 240x320 -o 1
xrandr -s 240x320 -o 1
THRESHOLD1=`cat /sys/devices/platform/lis302dl.1/threshold`
THRESHOLD2=`cat /sys/devices/platform/lis302dl.2/threshold`
echo 10 > /sys/devices/platform/lis302dl.1/threshold
echo 10 > /sys/devices/platform/lis302dl.2/threshold
/usr/games/opendoom -config ~/.opendoom/opendoom.cfg
echo $THRESHOLD1 > /sys/devices/platform/lis302dl.1/threshold
echo $THRESHOLD2 > /sys/devices/platform/lis302dl.2/threshold
#xrandr -display :0 -s 480x640 -o 0
xrandr -s 480x640 -o 0

Original comment by andrei.s...@gmail.com on 22 Mar 2009 at 9:42