]> git.openpandora.org Git - openpandora.oe.git/commitdiff
pandora-scripts: reset led brightness when disabled
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 29 May 2016 16:26:38 +0000 (19:26 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 29 May 2016 16:29:23 +0000 (19:29 +0300)
Changing the trigger to none turns off the LED but keeps brightness,
which causes the LED to be turned on after suspend. Could be fixed in
the kernel but easier to work around here.

recipes/pandora-system/pandora-scripts.bb
recipes/pandora-system/pandora-scripts/op_ledsettings.sh
recipes/pandora-system/pandora-version.bb

index 7f98f573812aa81d1187d3b6aaa6044e94562d4c..8309a0e4687e1883f5b6ecb37f00b6ed3697d914 100644 (file)
@@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora"
 
 RDEPENDS = "bash sed gawk grep zenity"
 
-PR = "r168"
+PR = "r169"
 
 SRC_URI = " \
           file://op_bright.sh \
index 3377b74121c13edc594a9fbee215c8c2acca8fbc..756e2dbfbe75408c8dd135c0854f7313c48e0750 100644 (file)
@@ -63,6 +63,7 @@ case $mainsel in
     sed -i "s/.*pandora::sd1.*/pandora::sd1 mmc0/g" /etc/default/leds 
   else
     echo none > /sys/class/leds/pandora\:\:sd1/trigger
+    echo 0 > /sys/class/leds/pandora\:\:sd1/brightness
     sed -i "s/.*pandora::sd1.*/pandora::sd1 none/g" /etc/default/leds 
   fi
   ;;
@@ -73,6 +74,7 @@ case $mainsel in
     sed -i "s/.*pandora::sd2.*/pandora::sd2 mmc1/g" /etc/default/leds 
   else
     echo none > /sys/class/leds/pandora\:\:sd2/trigger
+    echo 0 > /sys/class/leds/pandora\:\:sd2/brightness
     sed -i "s/.*pandora::sd2.*/pandora::sd2 none/g" /etc/default/leds 
   fi
   ;;
@@ -88,6 +90,7 @@ case $mainsel in
     fi
   else
     echo none > /sys/class/leds/pandora\:\:bluetooth/trigger
+    echo 0 > /sys/class/leds/pandora\:\:bluetooth/brightness
     sed -i "s/.*pandora::bluetooth.*/pandora::bluetooth none/g" /etc/default/leds 
   fi
   ;;
@@ -121,6 +124,7 @@ case $mainsel in
     zenity --info --title="WiFi LED Set" --text "The WiFi LED has been enabled.\nPlease note: You need to disable and re-enable WiFi before it switches on again." --timeout 6
   else
     echo none > /sys/class/leds/pandora\:\:wifi/trigger
+    echo 0 > /sys/class/leds/pandora\:\:wifi/brightness
     sed -i "s/.*pandora::wifi.*/pandora::wifi none/g" /etc/default/leds 
   fi
   ;;
index ac2d27c0b66e57204de5015da20cd54d9422ed82..12eb1ea9b50f2fb4485532e36d9304e50449bb4c 100644 (file)
@@ -1,6 +1,6 @@
 DESCRIPTION = "Installs /etc/op-version file."
 LICENSE = "Public Domain"
-PR = "r28"
+PR = "r29"
 
 do_install() {
   OLD_PWD=$PWD