if [ $powerstate -eq "1" ]; then
#in lowpower mode
oldspeed=$(cat /tmp/oldspeed)
- if [ $oldspeed -gt 14 ] && [ $oldspeed -le 900 ]; then
- echo $oldspeed > /proc/pandora/cpu_mhz_max
- else
- echo 500 > /proc/pandora/cpu_mhz_max
- fi
+ /usr/pandora/scripts/op_cpuspeed.sh $oldspeed
echo 0 > /tmp/powerstate
oldbright=$(cat /tmp/oldbright)
maxbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness)
echo 0 > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
echo 1 > /sys/devices/platform/omapfb/graphics/fb0/blank
echo 16 > /sys/class/leds/pandora\:\:power/brightness #dim power LED
- echo 125 > /proc/pandora/cpu_mhz_max
+ /usr/pandora/scripts/op_cpuspeed.sh 125
fi
elif [ "$1" -ge "3" ]; then #button was pressed 3 sec or longer, shutdown
xfceuser=$(ps u -C xfce4-session | tail -n1 | awk '{print $1}')