git.openpandora.org
/
pandora-libraries.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afe1ce9
)
new file: testdata/scripts/op_lid.sh
author
vimacs
<vimacs@pndtest>
Thu, 31 Dec 2009 01:59:34 +0000
(
02:59
+0100)
committer
vimacs
<vimacs@pndtest>
Thu, 31 Dec 2009 01:59:34 +0000
(
02:59
+0100)
testdata/scripts/op_lid.sh
[new file with mode: 0644]
patch
|
blob
diff --git a/testdata/scripts/op_lid.sh
b/testdata/scripts/op_lid.sh
new file mode 100644
(file)
index 0000000..
1ec445d
--- /dev/null
+++ b/
testdata/scripts/op_lid.sh
@@ -0,0
+1,10
@@
+#!/bin/bash
+#actions done when the lid is closed
+#only argument is 0 for open 1 for closed
+
+if [ "$1" = "1" ]; then #lid was closed
+ /usr/pandora/scripts/op_bright.sh 0
+elif [ "$1" = "0" ]; then # lid was opend
+ /usr/pandora/scripts/op_bright.sh $(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness)
+fi
+