summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-02-28 15:39:32 -0600
committerJohn Klug <john.klug@multitech.com>2019-07-03 17:08:20 -0500
commitaf202dc07bea4b872aa5ceb491df65320645b83e (patch)
treee821c0904867b6ad3564686a5d990964992cde42 /recipes-navigation/gpsd/gpsd
parent2bdc132e298f16bce6943a7da2c54fcf2672a036 (diff)
downloadmeta-mlinux-af202dc07bea4b872aa5ceb491df65320645b83e.tar.gz
meta-mlinux-af202dc07bea4b872aa5ceb491df65320645b83e.tar.bz2
meta-mlinux-af202dc07bea4b872aa5ceb491df65320645b83e.zip
gpsd CPU efficiencies for MTR
Diffstat (limited to 'recipes-navigation/gpsd/gpsd')
-rwxr-xr-xrecipes-navigation/gpsd/gpsd/gpsd21
-rw-r--r--recipes-navigation/gpsd/gpsd/gpsd-default9
2 files changed, 22 insertions, 8 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd
index d544ff5..781e109 100755
--- a/recipes-navigation/gpsd/gpsd/gpsd
+++ b/recipes-navigation/gpsd/gpsd/gpsd
@@ -39,16 +39,25 @@ CAPABILITY=/sys/devices/platform/mts-io/capability/gps
# Exit if no gps found
([[ -n $GPS_LINE ]] && [[ -c $GPS_LINE ]]) || exit 0
+# Assemble the GPS devices
+# PPS device is needed so GPSD finds the PPS.
+if [[ -c $GPS_PPS ]] ; then
+ : ${GPS_DEVICES:="$GPS_LINE $GPS_PPS"}
+else
+ : ${GPS_DEVICES:="$GPS_LINE"}
+fi
+
+
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
-if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then
- GPSD_SOCKET=/var/run/gpsd.sock
-fi
+#if [ -z "$GPSD_SOCKET" ] && [ -z "$GPS_DEVICES" ]; then
+# GPSD_SOCKET=/var/run/gpsd.sock
+#fi
-if [ -n "$GPSD_SOCKET" ]; then
- GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET"
-fi
+#if [ -n "$GPSD_SOCKET" ]; then
+# GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET"
+#fi
#
# Function that starts the daemon/service
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default
index 98f998b..5c59791 100644
--- a/recipes-navigation/gpsd/gpsd/gpsd-default
+++ b/recipes-navigation/gpsd/gpsd/gpsd-default
@@ -1,13 +1,18 @@
ENABLED="yes"
-GPSD_SOCKET="/var/run/gpsd.sock"
+#GPSD_SOCKET="/var/run/gpsd.sock"
+GPSD_SOCKET=""
GPSD_OPTIONS="-n -D 1"
# Conduit 0.1 GPS devices
GPS_LINE=/dev/gps0
+GPS_PPS=/dev/pps0
# Highest speed permitted by uBlox.
GPS_BAUD=115200
-GPS_DEVICES="$GPS_LINE /dev/pps0"
+
+# Use this if you must use a specific pps
+# that does not exist prior to gpsd running.
+# GPS_DEVICES="/dev/gps1 /dev/pps1"
GPS_FIXFILE=/var/run/gpsfix