From 066eabf3dc9ec218f16fd988fd2ce2e18cb88c33 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 22 May 2019 13:44:38 -0500 Subject: Add MTHS u-blox initialization to mLinux 5 --- recipes-navigation/gpsd/gpsd/gpsd-default | 8 ++++++++ recipes-navigation/gpsd/gpsd_3.16.bb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'recipes-navigation') diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 7dd5372..fa67fd1 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -52,6 +52,14 @@ GPSFIX="3" # should not need to change the baud rate. # function SET_GPS_SPEED { +if [[ $(mts-io-sysfs show hw-version) =~ ^MTHS- ]] ; then + if gpsctl -t 'u-blox' -D 5 -x '\x06\x41\x00\x00\x03\x1F\x90\x47\x4F\xB1\xFF\xFF\xEA\xFF' $GPS_LINE ; then + logger -s -t 'gpsd info' -p daemon.info "GPS LNA set high" + else + logger -s -t 'gpsd info' -p daemon.alert "ERROR: GPS LNA not set" + fi +fi + if [[ $(cat /run/config/gpstype) == u-blox ]] ; then # 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 diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.16.bb index 35719aa..2111399 100644 --- a/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/recipes-navigation/gpsd/gpsd_3.16.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m12" +PR="m13" EXTRANATIVEPATH += "chrpath-native" -- cgit v1.2.3 From e1d699cac9b3ead2da7c7904a873fca6674e9e4d Mon Sep 17 00:00:00 2001 From: John Klug Date: Fri, 20 Dec 2019 17:04:22 -0600 Subject: Correct new gpsd_settime script in case status is missing from gpspipe output --- recipes-navigation/gpsd/gpsd/gpsd_settime.sh | 2 +- recipes-navigation/gpsd/gpsd_3.16.bb | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'recipes-navigation') diff --git a/recipes-navigation/gpsd/gpsd/gpsd_settime.sh b/recipes-navigation/gpsd/gpsd/gpsd_settime.sh index 578013b..e8e8f26 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd_settime.sh +++ b/recipes-navigation/gpsd/gpsd/gpsd_settime.sh @@ -63,7 +63,7 @@ fi ) & # Get the ISO8601 time from GPSD -ISO8601=$(gpspipe -w | grep -m1 '{"class":"TPV","device":"/dev/gps0","status":.*,"time":"' | sed -e 's/.*,"time":"//' -e 's/Z",.*//') +ISO8601=$(gpspipe -w | egrep -m1 '\{"class":"TPV","device":"/dev/gps0"(,"status":[0-9])*,"mode":3,"time":"' | sed -e 's/.*,"time":"//' -e 's/Z",.*//') if (( ${#ISO8601} > 18 )) ; then LG -p user.warn "Updating time to time, ${ISO8601}." diff --git a/recipes-navigation/gpsd/gpsd_3.16.bb b/recipes-navigation/gpsd/gpsd_3.16.bb index 2111399..704a928 100644 --- a/recipes-navigation/gpsd/gpsd_3.16.bb +++ b/recipes-navigation/gpsd/gpsd_3.16.bb @@ -4,7 +4,7 @@ LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800" DEPENDS = "dbus dbus-glib ncurses python libusb1 chrpath-replacement-native pps-tools" PROVIDES = "virtual/gpsd" -PR="m13" +PR="m14" EXTRANATIVEPATH += "chrpath-native" @@ -21,6 +21,8 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://gpsd \ file://gpsd_ubx_fixed.sh \ file://gpsd_ubx_settime.sh \ + file://gpsd_settime.sh \ + file://gpsd_fixed.sh \ file://gpsd.rules \ file://gpsd.service \ " @@ -122,6 +124,8 @@ do_install_append() { install -d ${D}${sbindir} install -m 0755 ${WORKDIR}/gpsd_ubx_fixed.sh ${D}${sbindir}/gpsd_ubx_fixed install -m 0755 ${WORKDIR}/gpsd_ubx_settime.sh ${D}${sbindir}/gpsd_ubx_settime + install -m 0755 ${WORKDIR}/gpsd_fixed.sh ${D}${sbindir}/gpsd_fixed + install -m 0755 ${WORKDIR}/gpsd_settime.sh ${D}${sbindir}/gpsd_settime #support for udev install -d ${D}/${sysconfdir}/udev/rules.d @@ -168,7 +172,7 @@ PACKAGES =+ "libgps libgpsd python-pygps-dbg python-pygps gpsd-udev gpsd-conf gp # FILES_${PN}-dev += "${libdir}/pkgconfdir/libgpsd.pc ${libdir}/pkgconfdir/libgps.pc \ # ${includedir}/gps.h ${includedir}/libgpsmm.h ${includedir}/gps" -FILES_${PN} += "${sbindir}/gpsd_ubx_fixed ${sbindir}/gpsd_ubx_settime" +FILES_${PN} += "${sbindir}/gpsd_*" FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" -- cgit v1.2.3 From be6b8557a4366e0e754e3c85393c4baeebcb0c1b Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 2 Jan 2020 13:05:41 -0600 Subject: gpsd takes too long to quit when there is no antenna signal --- recipes-navigation/gpsd/gpsd/gpsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'recipes-navigation') diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index 3f93442..b4068c9 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -93,7 +93,7 @@ do_stop() # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - /usr/sbin/start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + /usr/sbin/start-stop-daemon --stop --quiet --signal KILL --pidfile $PIDFILE --name $NAME RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. -- cgit v1.2.3