summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd/gpsd-default
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-navigation/gpsd/gpsd/gpsd-default')
-rw-r--r--recipes-navigation/gpsd/gpsd/gpsd-default24
1 files changed, 10 insertions, 14 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default
index bb4df93..168b0cf 100644
--- a/recipes-navigation/gpsd/gpsd/gpsd-default
+++ b/recipes-navigation/gpsd/gpsd/gpsd-default
@@ -16,17 +16,14 @@ GPS_BAUD=115200
GPS_FIXFILE=/var/run/gpsfix
-# GPSD/UBlox Lock requiremnt
-# Create GPS_FIXFILE when reached.
-# UBlox NAV SOL (0x01 0x06) at gpsFix value
-# and above
-# 00 No Fix
-# 01 Dead reckoning only
-# 02 2D fix
-# 03 3D fix
-# 04 GPS + dead reckoning combined
-# 05 Time only fix
-GPSFIX="03 05"
+# GPSD Json TPV object, mode field.
+# See: http://www.catb.org/gpsd/gpsd_json.html
+#
+# 0 Unknown
+# 1 No fix
+# 2 2D fix
+# 3 3D fix
+GPSFIX="3"
# U-Blox defaults to 9600. If the
# default speed is not set before changing
@@ -52,7 +49,7 @@ GPSFIX="03 05"
# If the line speed is already 115200, we
# should not need to change the baud rate.
#
-read -r -d '' SET_GPS_SPEED <<"EOF"
+function SET_GPS_SPEED {
if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
logger -t gpsd -p daemon.info "Attempting to set baud rate to ${GPS_BAUD}"
if ! gpsctl -T 20 -t u-blox -s $GPS_BAUD -b -f $GPS_LINE ; then
@@ -67,6 +64,5 @@ if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
gpsctl -T 2 -f $GPS_LINE
stty -F $GPS_LINE $GPS_BAUD
fi
-EOF
-
+}