diff options
Diffstat (limited to 'recipes-navigation')
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd | 10 | ||||
-rw-r--r-- | recipes-navigation/gpsd/gpsd/gpsd-default | 6 |
2 files changed, 15 insertions, 1 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index c0e4c2b..d9cf201 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -43,6 +43,10 @@ if [ -n "$GPSD_SOCKET" ]; then GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" fi +if ! [[ -L /dev/gps${GPS_NUM} ]] ; then + ln -s $GPS_LINE /dev/gps${GPS_NUM} +fi + # # Function that starts the daemon/service # @@ -55,6 +59,12 @@ do_start() # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started + # Set the baud rate. Works better with ntp at a higher baud rate. + gpsctl -t 'u-blox' -s $GPS_BAUD -b -f $GPS_LINE + # 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. + gpsctl -T 2 -f $GPS_LINE + stty -F $GPS_LINE $GPS_BAUD /usr/sbin/start-stop-daemon -N -20 --start --quiet --pidfile $PIDFILE --exec $DAEMON --test \ -- $GPSD_OPTIONS -P $PIDFILE $GPS_DEVICES > /dev/null \ || return 1 diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 61ca995..00576d3 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -3,6 +3,10 @@ GPSD_SOCKET="/var/run/gpsd.sock" GPSD_OPTIONS="-n -D 1" # Conduit 0.1 GPS devices -GPS_DEVICES="/dev/ttyXRUSB2 /dev/pps0" +GPS_LINE=/dev/ttyXRUSB2 +GPS_NUM=0 +# Highest speed permitted by uBlox. +GPS_BAUD=115200 +GPS_DEVICES="$GPS_LINE /dev/pps0" GPSD_NOSTART=0 |