diff options
Diffstat (limited to 'recipes-navigation')
-rwxr-xr-x | recipes-navigation/gpsd/gpsd/gpsd | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index b4068c9..36ca387 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -36,8 +36,25 @@ CAPABILITY=/sys/devices/platform/mts-io/capability/gps # Exit if we have no GPS capability ( [[ -f $CAPABILITY ]] && (($(cat $CAPABILITY) == 1)) ) || exit 0 -# Exit if no gps found -([[ -n $GPS_LINE ]] && [[ -c $GPS_LINE ]]) || exit 0 +([[ -n $GPS_LINE ]]) || exit 0 + +((numtries = 10)) +if [[ $(cat /run/config/gpstype) == u-blox ]] ; then + while ((numtries > 0)) ; do + if [ -c $GPS_LINE ];then + logger -s -t 'gpsd info' -p daemon.info $GPS_LINE" found" + break + fi + sleep 1 + done + if ((numtries == 0));then + logger -s -t 'gpsd info' -p daemon.info $GPS_LINE" not found. gpsd will not start" + exit 0 + fi +else + # Exit if no gps found + ([[ -c $GPS_LINE ]]) || exit 0 +fi # Assemble the GPS devices # PPS device is needed so GPSD finds the PPS. |