git.openpandora.org
/
openpandora.oe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb69360
)
pandora-scripts: make op_nubmode.py update nubs.state directly
author
Grazvydas Ignotas
<notasas@gmail.com>
Mon, 20 Oct 2014 00:14:28 +0000
(
03:14
+0300)
committer
Grazvydas Ignotas
<notasas@gmail.com>
Mon, 20 Oct 2014 00:14:28 +0000
(
03:14
+0300)
recipes/pandora-system/pandora-scripts.bb
patch
|
blob
|
history
recipes/pandora-system/pandora-scripts/op_nubmode.py
patch
|
blob
|
history
recipes/pandora-system/pandora-state.bb
patch
|
blob
|
history
recipes/pandora-system/pandora-state/rc.pandora-state
patch
|
blob
|
history
diff --git
a/recipes/pandora-system/pandora-scripts.bb
b/recipes/pandora-system/pandora-scripts.bb
index
75ec856
..
9732249
100644
(file)
--- a/
recipes/pandora-system/pandora-scripts.bb
+++ b/
recipes/pandora-system/pandora-scripts.bb
@@
-5,7
+5,7
@@
COMPATIBLE_MACHINE = "omap3-pandora"
RDEPENDS = "bash sed gawk grep zenity"
RDEPENDS = "bash sed gawk grep zenity"
-PR = "r16
2
"
+PR = "r16
3
"
SRC_URI = " \
file://op_bright.sh \
SRC_URI = " \
file://op_bright.sh \
diff --git
a/recipes/pandora-system/pandora-scripts/op_nubmode.py
b/recipes/pandora-system/pandora-scripts/op_nubmode.py
index
8183e8b
..
3086271
100755
(executable)
--- a/
recipes/pandora-system/pandora-scripts/op_nubmode.py
+++ b/
recipes/pandora-system/pandora-scripts/op_nubmode.py
@@
-6,6
+6,7
@@
import sys
import gtk
import time
import optparse
import gtk
import time
import optparse
+import shutil
# ================================================================
# ================================================================
@@
-289,6
+290,10
@@
class NubConfig(object):
def on_WriteNubConfig_clicked(self, widget, *data):
StoreProc(self.model.settings)
def on_WriteNubConfig_clicked(self, widget, *data):
StoreProc(self.model.settings)
+ shutil.copyfile("/etc/pandora/conf/nubs.state", "/tmp/nubs.state");
+ os.system("sed -i -e '1c\%s' /tmp/nubs.state" % self.model.settings['mode0'])
+ os.system("sed -i -e '7c\%s' /tmp/nubs.state" % self.model.settings['mode1'])
+ shutil.copyfile("/tmp/nubs.state", "/etc/pandora/conf/nubs.state");
self.Notify("Nub configuration updated.")
def on_SaveProfile_clicked(self, widget, *data):
self.Notify("Nub configuration updated.")
def on_SaveProfile_clicked(self, widget, *data):
diff --git
a/recipes/pandora-system/pandora-state.bb
b/recipes/pandora-system/pandora-state.bb
index
7a38bf1
..
d989ad5
100755
(executable)
--- a/
recipes/pandora-system/pandora-state.bb
+++ b/
recipes/pandora-system/pandora-state.bb
@@
-5,7
+5,7
@@
COMPATIBLE_MACHINE = "omap3-pandora"
RDEPENDS = "pandora-scripts"
RDEPENDS = "pandora-scripts"
-PR = "r2
3
"
+PR = "r2
4
"
inherit update-rc.d
INITSCRIPT_NAME = "pandora-state"
inherit update-rc.d
INITSCRIPT_NAME = "pandora-state"
diff --git
a/recipes/pandora-system/pandora-state/rc.pandora-state
b/recipes/pandora-system/pandora-state/rc.pandora-state
index
144f1ff
..
3e785e7
100644
(file)
--- a/
recipes/pandora-system/pandora-state/rc.pandora-state
+++ b/
recipes/pandora-system/pandora-state/rc.pandora-state
@@
-21,6
+21,8
@@
d_stop() {
fi
touch /etc/pandora/shutdown
cat $SYSFS_GAMMA > /etc/pandora/conf/gamma.state
fi
touch /etc/pandora/shutdown
cat $SYSFS_GAMMA > /etc/pandora/conf/gamma.state
+
+ # pnd_run.sh and nub configurator depend on nubs.state format
cat -v /proc/pandora/nub0/mode | sed -n '1p' > /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/mouse_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/scrollx_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/mode | sed -n '1p' > /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/mouse_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/scrollx_sensitivity | sed -n '1p' >> /etc/pandora/conf/nubs.state
@@
-35,6
+37,9
@@
d_stop() {
cat -v /proc/pandora/nub1/mbutton_threshold | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/mbutton_delay | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub1/mbutton_delay | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub1/mbutton_threshold | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub0/mbutton_delay | sed -n '1p' >> /etc/pandora/conf/nubs.state
cat -v /proc/pandora/nub1/mbutton_delay | sed -n '1p' >> /etc/pandora/conf/nubs.state
+
+ # nub tools want to update this file
+ chmod a+w /etc/pandora/conf/nubs.state
}
d_start() {
}
d_start() {