rc.pandora-lcd-state: Added nubs state
authorMichael Mrozek <EvilDragon@openpandora.org>
Wed, 14 Apr 2010 00:21:07 +0000 (02:21 +0200)
committerMichael Mrozek <EvilDragon@openpandora.org>
Wed, 14 Apr 2010 00:21:07 +0000 (02:21 +0200)
recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state

index a11d656..a5c00cd 100644 (file)
@@ -12,15 +12,19 @@ DESC="OpenPandora Save and Restore LCD Settings"
 NAME="pandora-lcd-state"
 
 d_stop() {
 NAME="pandora-lcd-state"
 
 d_stop() {
-       echo "Saving LCD-Settings"
+       echo "Saving LCD and Nub-Settings"
        cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness > /etc/pandora/conf/brightness.state
        cat /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma > /etc/pandora/conf/gamma.state
        cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness > /etc/pandora/conf/brightness.state
        cat /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma > /etc/pandora/conf/gamma.state
+        cat /proc/pandora/vsense66 > /etc/pandora/conf/nubs.state
+       cat /proc/pandora/vsense67 >> /etc/pandora/conf/nubs.state
 }
 
 d_start() {
 }
 
 d_start() {
-       echo "Restoring LCD-Settings"
+       echo "Restoring LCD and Nub-Settings"
        cat /etc/pandora/conf/brightness.state > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness 
        cat /etc/pandora/conf/gamma.state > /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma
        cat /etc/pandora/conf/brightness.state > /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness 
        cat /etc/pandora/conf/gamma.state > /sys/devices/platform/omap2_mcspi.1/spi1.1/gamma
+       sed -n '1p' /etc/pandora/conf/nubs.state > /proc/pandora/vsense66
+       sed -n '2p' /etc/pandora/conf/nubs.state > /proc/pandora/vsense67
 }
 
 case "$1" in
 }
 
 case "$1" in