diff options
author | John Klug <john.klug@multitech.com> | 2021-05-07 03:44:03 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2021-05-07 03:44:48 -0500 |
commit | fba5c70e95a7511e1ff73df6002b3eab7b74b39a (patch) | |
tree | ab34a85f2834ee7b2ef7a91fb7a54d95709020e2 /recipes-navigation/gpsd/gpsd | |
parent | 393fc9b3ac7807b2664a9c3ce20389da1f94b61e (diff) | |
download | meta-mlinux-fba5c70e95a7511e1ff73df6002b3eab7b74b39a.tar.gz meta-mlinux-fba5c70e95a7511e1ff73df6002b3eab7b74b39a.tar.bz2 meta-mlinux-fba5c70e95a7511e1ff73df6002b3eab7b74b39a.zip |
Fix problems initializing U-Blox GPS
Diffstat (limited to 'recipes-navigation/gpsd/gpsd')
-rw-r--r--[-rwxr-xr-x] | recipes-navigation/gpsd/gpsd/gpsd-default | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index f6995fc..edd7b08 100755..100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -53,18 +53,18 @@ GPSFIX="3" # function SET_GPS_SPEED { -((maxtries = 10)) +((maxtries = 20)) if [[ $(cat /run/config/gpstype) == u-blox ]] ; then - while ((maxtries > 0)) ; do + while ((maxtries >= 0)) ; do ((maxtries--)) - if ((maxtries == 5)) ; then + if ((maxtries % 5 == 0)) ; then # Not going well, so reset the GPS. logger -s -t 'gpsd info' -p daemon.alert "u-blox is unresponsive, so reset it" + # reset tty to defaults + stty -F "$GPS_LINE" '500:5:cbd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0' mts-io-sysfs store gnss-reset 0 - usleep 50 + usleep 100 mts-io-sysfs store gnss-reset 1 - # Reset terminal to defaults - stty -F "$GPS_LINE" '500:5:cbd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0' sleep 5 fi # Reset at maxtries == 5 |