diff options
Diffstat (limited to 'recipes-navigation/gpsd')
-rwxr-xr-x[-rw-r--r--] | recipes-navigation/gpsd/gpsd/gpsd-default | 15 | ||||
-rw-r--r-- | recipes-navigation/gpsd/gpsd_3.20.bb | 2 |
2 files changed, 13 insertions, 4 deletions
diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 9bc1eef..b4bf11b 100644..100755 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -79,13 +79,22 @@ if [[ $(cat /run/config/gpstype) == u-blox ]] ; then fi # Set the baud rate. Works better with ntp at a higher baud rate. - if ! gpsctl -T 20 -t 'u-blox' -s $GPS_BAUD -b -f $GPS_LINE ; then + gpsctlout=$(gpsctl -T 20 -t 'u-blox' -s $GPS_BAUD -b -f $GPS_LINE 2>&1) + result=$? + if [[ $gpsctlout =~ u-blox[[:space:]]at[[:space:]]115200[[:space:]]baud ]] ; then + break + fi + + if ((result != 0)) ; then + echo $gpsctlout echo 'WARNING: Unable to set GPS serial port speed.' else # The next line is needed due to a bug in gpsctl. # We will go back to the default baud rate if we don't do this step. - echo Expect a timeout error here. Need this error. - gpsctl -T 2 -f $GPS_LINE + gpsctlout=$(gpsctl -T 2 -f $GPS_LINE 2>&1) + if [[ $gpsctlout =~ u-blox[[:space:]]at[[:space:]]115200[[:space:]]baud ]] ; then + break + fi stty -F $GPS_LINE $GPS_BAUD fi speed=$(stty -F $GPS_LINE speed 2>&1) diff --git a/recipes-navigation/gpsd/gpsd_3.20.bb b/recipes-navigation/gpsd/gpsd_3.20.bb index e177884..b6a3773 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="m2" +PR="m3" EXTRANATIVEPATH += "chrpath-native" |