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-default76
1 files changed, 0 insertions, 76 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default
deleted file mode 100644
index fa67fd1..0000000
--- a/recipes-navigation/gpsd/gpsd/gpsd-default
+++ /dev/null
@@ -1,76 +0,0 @@
-ENABLED="yes"
-
-# GPSD control socket for sending GPSD commands.
-# GPSD_SOCKET="/var/run/gpsd.sock"
-
-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
-
-# 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
-
-# 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
-# the baud rate, this does not work
-# except right after a boot when the speed
-# is 9600 baud.
-#
-# 115200 baud is preferred to reduce the CPU
-# load. Also, u-blox mode is preferred to
-# nmea, as it is more efficient.
-#
-# We check for U-Blox first, because
-# we do not set the baud rate of other
-# GPS types.
-#
-# This gpsctl does not always work, because
-# the line speed might be wrong, so if we
-# fail, we change the baud rate and try again.
-#
-# There should only be two speeds, 115200
-# or 9600.
-#
-# If the line speed is already 115200, we
-# should not need to change the baud rate.
-#
-function SET_GPS_SPEED {
-if [[ $(mts-io-sysfs show hw-version) =~ ^MTHS- ]] ; then
- if gpsctl -t 'u-blox' -D 5 -x '\x06\x41\x00\x00\x03\x1F\x90\x47\x4F\xB1\xFF\xFF\xEA\xFF' $GPS_LINE ; then
- logger -s -t 'gpsd info' -p daemon.info "GPS LNA set high"
- else
- logger -s -t 'gpsd info' -p daemon.alert "ERROR: GPS LNA not set"
- fi
-fi
-
-if [[ $(cat /run/config/gpstype) == u-blox ]] ; then
- # Set the baud rate. Works better with ntp at a higher baud rate.
- if ! gpsctl -T 20 -t 'u-blox' -s $GPS_BAUD -b -f $GPS_LINE ; then
- echo 'WARNING: Unable to set GPS serial port speed.'
- else
- # The next line is needed due to a bug in gpsctl.
- # We will go back to the default baud rate if we don't do this step.
- echo Expect a timeout error here. Need this error.
- gpsctl -T 2 -f $GPS_LINE
- stty -F $GPS_LINE $GPS_BAUD
- fi
-fi # End of U-Blox GPS type
-}
-