nubs: Fixed the scripts so that we won't have tons of vsense errors on 3rd boot
authorMichael Mrozek <EvilDragon@openpandora.de>
Wed, 21 Apr 2010 23:05:10 +0000 (01:05 +0200)
committerMichael Mrozek <EvilDragon@openpandora.de>
Wed, 21 Apr 2010 23:05:10 +0000 (01:05 +0200)
recipes/pandora-system/pandora-lcd-state.bb
recipes/pandora-system/pandora-lcd-state/nubs.state
recipes/pandora-system/pandora-lcd-state/rc.pandora-lcd-state
recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_nubmode.sh

index 0f6321f..5b83726 100755 (executable)
@@ -3,7 +3,7 @@ LICENSE = "GPLv2"
 
 COMPATIBLE_MACHINE = "omap3-pandora"
 
-PR = "r1"
+PR = "r2"
 inherit update-rc.d
 
 INITSCRIPT_NAME = "pandora-lcd-state"
@@ -22,7 +22,7 @@ do_install() {
          install -d ${D}${sysconfdir}/pandora/conf/
           install -m 0644 ${WORKDIR}/gamma.state ${D}${sysconfdir}/pandora/conf/gamma.state
           install -m 0644 ${WORKDIR}/brightness.state ${D}${sysconfdir}/pandora/conf/brightness.state
-         install -m 0644 ${WORKDIR}/brightness.state ${D}${sysconfdir}/pandora/conf/nubs.state
+         install -m 0644 ${WORKDIR}/nubs.state ${D}${sysconfdir}/pandora/conf/nubs.state
 }
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
index a5c00cd..80d0c3f 100644 (file)
@@ -15,8 +15,8 @@ d_stop() {
        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 /proc/pandora/vsense66 > /etc/pandora/conf/nubs.state
-       cat /proc/pandora/vsense67 >> /etc/pandora/conf/nubs.state
+        cat cat -v /proc/pandora/vsense66 | sed -n '1p' > /etc/pandora/conf/nubs.state
+       cat cat -v /proc/pandora/vsense67 | sed -n '1p' >> /etc/pandora/conf/nubs.state
 }
 
 d_start() {
index 0b0a63d..d96ca35 100644 (file)
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 DEPENDS = "zenity dbus"
 RDEPENDS = "zenity dbus"
 
-PR = "r18"
+PR = "r19"
 
 SRC_URI = " \
           file://op_bright.sh \
index 071a3f3..634344d 100755 (executable)
@@ -1,12 +1,12 @@
 #!/bin/bash
 
-if nubl=$(zenity --height=250 --list --title="Select Nub-mode for the left nub" --text="Please select the modus for the left nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick" "mbuttons" "Use the nub as mouse buttons (not implemented yet)") ; then
+if nubl=$(zenity --height=300 --list --title="Select Nub-mode for the left nub" --text="Please select the modus for the left nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
 
 echo $nubl > /proc/pandora/vsense66
 
 fi
 
-if nubr=$(zenity --height=250 --list --title="Select Nub-mode for the right nub" --text="Please select the modus for the right nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick" "mbuttons" "Use the nub as mouse buttons (not implemented yet)") ; then
+if nubr=$(zenity --height=300 --list --title="Select Nub-mode for the right nub" --text="Please select the modus for the right nub.\n\nNote: This can affect running programs.\nSome programs also may change the nub mode themselves."  --column "return" --hide-column=1 --column "Nub Mode" "mouse" "Use the nub as mouse" "scroll" "Use the nub for scrolling" "absolute" "Use the nub as joystick") ; then
 
 echo $nubr > /proc/pandora/vsense67