From 07aae886459ef0237a94e0739b6b744d07f71dd8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 7 May 2021 03:44:03 -0500 Subject: Fix problems initializing U-Blox GPS --- recipes-navigation/gpsd/gpsd/gpsd-default | 12 ++++++------ recipes-navigation/gpsd/gpsd_3.20.bb | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) mode change 100755 => 100644 recipes-navigation/gpsd/gpsd/gpsd-default (limited to 'recipes-navigation/gpsd') diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default old mode 100755 new mode 100644 index f6995fc..edd7b08 --- 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 diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb index 514ca0a..0e78417 100644 --- a/recipes-navigation/gpsd/gpsd_3.20.bb +++ b/recipes-navigation/gpsd/gpsd_3.20.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=01764c35ae34d9521944bb6ab312af53" DEPENDS = "dbus dbus-glib ncurses python3 libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m7" +PR="m8" #TODO #the recipe generates python2 pygps package for Atmel based devices and python3 pygps package for TI based devices. -- cgit v1.2.3