summaryrefslogtreecommitdiff
path: root/recipes-navigation
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2021-01-25 03:36:13 -0600
committerJohn Klug <john.klug@multitech.com>2021-01-25 03:36:13 -0600
commit1a9755712cac194ac821b19b8c4e98a04c8efdae (patch)
tree6166fbea704751b18337212e7bbe8c67b10f46c9 /recipes-navigation
parente8b82553e01f6a459dd373e7ac4595711e70ac05 (diff)
downloadmeta-mlinux-1a9755712cac194ac821b19b8c4e98a04c8efdae.tar.gz
meta-mlinux-1a9755712cac194ac821b19b8c4e98a04c8efdae.tar.bz2
meta-mlinux-1a9755712cac194ac821b19b8c4e98a04c8efdae.zip
If gpsctl is successful the first time, quit
Diffstat (limited to 'recipes-navigation')
-rwxr-xr-x[-rw-r--r--]recipes-navigation/gpsd/gpsd/gpsd-default15
-rw-r--r--recipes-navigation/gpsd/gpsd_3.20.bb2
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"