diff options
author | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2021-02-12 12:17:52 +0200 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-06-22 09:18:32 -0500 |
commit | 00925c222af65379311c91896b31eee66733b2d0 (patch) | |
tree | b1db29a45d040f9ab14e33acfecf01494158565a /recipes-navigation | |
parent | 9a422725ab9a59f7f22c0a7dfeac4a6384814ed3 (diff) | |
download | meta-mlinux-00925c222af65379311c91896b31eee66733b2d0.tar.gz meta-mlinux-00925c222af65379311c91896b31eee66733b2d0.tar.bz2 meta-mlinux-00925c222af65379311c91896b31eee66733b2d0.zip |
add waiting of /dev/gps0
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. |