aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/freondemo/files
diff options
context:
space:
mode:
authorRoger Monk <r-monk@ti.com>2010-03-23 23:35:17 +0000
committerKoen Kooi <koen@openembedded.org>2010-04-12 19:43:30 +0200
commit311312722b9e2f02deec0f5f64ca67ef90975fc1 (patch)
tree7604e38bbd71da7b52aab7e34d29d8d7c3f8b3b9 /recipes/freondemo/files
parent406284396169439b93524a4b65a8f075b2a4e0aa (diff)
downloadopenembedded-311312722b9e2f02deec0f5f64ca67ef90975fc1.tar.gz
freondemo/gstd: Add updates from latest RR recipes
* Updated recipes (logic) merged from latest Ridgerun recipes * Whitespace formatting maintained from earlier cleanup Signed-off-by: Roger Monk <r-monk@ti.com> Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes/freondemo/files')
-rwxr-xr-x[-rw-r--r--]recipes/freondemo/files/freondemo34
-rw-r--r--recipes/freondemo/files/freondemo.init7
2 files changed, 26 insertions, 15 deletions
diff --git a/recipes/freondemo/files/freondemo b/recipes/freondemo/files/freondemo
index 80dd36e132..bd8a3b609f 100644..100755
--- a/recipes/freondemo/files/freondemo
+++ b/recipes/freondemo/files/freondemo
@@ -1,20 +1,32 @@
#!/bin/sh
# We start a system wide gstd daemon
-gstd &
-
-amixer -q sset 'HP DAC' 127
+if ! pidof gstd > /dev/null; then
+ { gstd 2>&1 | logger -t GSTD & } ;
+fi
+
+
+amixer -q sset 'HP DAC' 127
+amixer -q sset 'Line DAC' 127
#If we detect a mouse, use it, otherwise configure the touchcreen
-if [ ! -c /dev/input/mice ] && [ ! -c /dev/input/mouse0 ] ; then
- if [ -c /dev/input/touchscreen0 ] ; then
- export TSLIB_TSDEVICE=/dev/input/touchscreen0
- if [ ! -f /etc/pointercal ] ; then
- # We need to calibrate the screen
- ts_calibrate
- fi
- export QWS_MOUSE_PROTO=tslib
+if ! grep -q mouse1 /proc/bus/input/devices ; then
+ if grep -q Touchscreen /proc/bus/input/devices && [ -c /dev/input/touchscreen0 ] ; then
+ export TSLIB_TSDEVICE=/dev/input/touchscreen0
+ if [ ! -f /etc/pointercal ] ; then
+ # We need to calibrate the screen
+ ts_calibrate
+ fi
+ echo -e "\nFreonDemo using touchscreen"
+ export QWS_MOUSE_PROTO=tslib:/dev/input/touchscreen0
+ else
+ echo "ERROR, no mouse or touchscreen detected for FreonDemo"
+ exit 1;
fi
+else
+ echo -e "\nFreonDemo using mouse input"
+ export QWS_MOUSE_PROTO=MouseMan:/dev/input/mouse1
fi
+#Otherwise try to use the touchscren
/usr/libexec/FreonDemo -qws &
diff --git a/recipes/freondemo/files/freondemo.init b/recipes/freondemo/files/freondemo.init
index 5cb5281245..3b406b2968 100644
--- a/recipes/freondemo/files/freondemo.init
+++ b/recipes/freondemo/files/freondemo.init
@@ -4,7 +4,7 @@ set -e
DAEMON=/usr/bin/freondemo
NAME=freondemo
-PIDFILE=/var/run/freondemo/pid
+PIDFILE=/var/run/freondemo.pid
DESC="Freon Demo"
PARAMS=""
@@ -22,10 +22,9 @@ start_it_up()
fi
fi
- source $SESSIONFILE
echo -n "Starting $DESC: "
- start-stop-daemon --start --pidfile $PIDFILE \
- --exec $DAEMON -- $PARAMS
+ start-stop-daemon --start --exec $DAEMON -- $PARAMS
+ pidof FreonDemo > $PIDFILE
echo "$NAME."
}