diff options
Diffstat (limited to 'recipes-navigation/gpsd/gpsd/gpsd')
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd | 21 |
1 files changed, 15 insertions, 6 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 |