From af202dc07bea4b872aa5ceb491df65320645b83e Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 28 Feb 2019 15:39:32 -0600 Subject: gpsd CPU efficiencies for MTR --- recipes-navigation/gpsd/gpsd/gpsd | 21 ++++++++++----- recipes-navigation/gpsd/gpsd/gpsd-default | 9 +++++-- recipes-navigation/gpsd/gpsd_3.18.1.bb | 44 +++++++++++++++++++++++++++++-- 3 files changed, 64 insertions(+), 10 deletions(-) (limited to 'recipes-navigation') diff --git a/recipes-navigation/gpsd/gpsd/gpsd b/recipes-navigation/gpsd/gpsd/gpsd index d544ff5..781e109 100755 --- a/recipes-navigation/gpsd/gpsd/gpsd +++ b/recipes-navigation/gpsd/gpsd/gpsd @@ -39,16 +39,25 @@ CAPABILITY=/sys/devices/platform/mts-io/capability/gps # Exit if no gps found ([[ -n $GPS_LINE ]] && [[ -c $GPS_LINE ]]) || exit 0 +# Assemble the GPS devices +# PPS device is needed so GPSD finds the PPS. +if [[ -c $GPS_PPS ]] ; then + : ${GPS_DEVICES:="$GPS_LINE $GPS_PPS"} +else + : ${GPS_DEVICES:="$GPS_LINE"} +fi + + # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 -if [ -z "$GPSD_SOCKET" ] && [ -z "$DEVICES" ]; then - GPSD_SOCKET=/var/run/gpsd.sock -fi +#if [ -z "$GPSD_SOCKET" ] && [ -z "$GPS_DEVICES" ]; then +# GPSD_SOCKET=/var/run/gpsd.sock +#fi -if [ -n "$GPSD_SOCKET" ]; then - GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" -fi +#if [ -n "$GPSD_SOCKET" ]; then +# GPSD_OPTIONS="$GPSD_OPTIONS -F $GPSD_SOCKET" +#fi # # Function that starts the daemon/service diff --git a/recipes-navigation/gpsd/gpsd/gpsd-default b/recipes-navigation/gpsd/gpsd/gpsd-default index 98f998b..5c59791 100644 --- a/recipes-navigation/gpsd/gpsd/gpsd-default +++ b/recipes-navigation/gpsd/gpsd/gpsd-default @@ -1,13 +1,18 @@ ENABLED="yes" -GPSD_SOCKET="/var/run/gpsd.sock" +#GPSD_SOCKET="/var/run/gpsd.sock" +GPSD_SOCKET="" GPSD_OPTIONS="-n -D 1" # Conduit 0.1 GPS devices GPS_LINE=/dev/gps0 +GPS_PPS=/dev/pps0 # Highest speed permitted by uBlox. GPS_BAUD=115200 -GPS_DEVICES="$GPS_LINE /dev/pps0" + +# Use this if you must use a specific pps +# that does not exist prior to gpsd running. +# GPS_DEVICES="/dev/gps1 /dev/pps1" GPS_FIXFILE=/var/run/gpsfix diff --git a/recipes-navigation/gpsd/gpsd_3.18.1.bb b/recipes-navigation/gpsd/gpsd_3.18.1.bb index 5a64d3e..10197f3 100644 --- a/recipes-navigation/gpsd/gpsd_3.18.1.bb +++ b/recipes-navigation/gpsd/gpsd_3.18.1.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="m2" +PR="m3" EXTRANATIVEPATH += "chrpath-native" @@ -44,6 +44,8 @@ export HOST_SYS PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)}" PACKAGECONFIG[bluez] = "bluez='false',${BLUEZ}" PACKAGECONFIG[qt] = "qt='yes',qt='no',qt4-x11-free" + +# Remove unneeded features. netfeed is needed by gpsmon EXTRA_OESCONS = " \ sysroot=${STAGING_DIR_TARGET} \ libQgpsmm='false' \ @@ -58,6 +60,42 @@ EXTRA_OESCONS = " \ gpsd_group='gps' \ ntpshm='yes' \ prefix='usr' \ + control_socket='false' \ + nofloats='yes' \ + ashtech='false' \ + earthmate='false' \ + evermore='false' \ + fury='false' \ + fv18='false' \ + garmin='false' \ + garmintxt='false' \ + geostar='false' \ + greis='false' \ + itrax='false' \ + mtk3301='false' \ + navcom='false' \ + nmea0183='true' \ + nmea2000='false' \ + oncore='false' \ + sirf='false' \ + skytraq='false' \ + superstar2='false' \ + tnt='false' \ + tripmate='false' \ + tsip='false' \ + ublox='true' \ + aivdm='false' \ + gpsclock='false' \ + isync='false' \ + ntrip='false' \ + oceanserver='false' \ + passthrough='false' \ + rtcm104v2='false' \ + rtcm104v3='false' \ + bluez='false' \ + ipv6='false' \ + netfeed='true' \ + usb='false' \ ${PACKAGECONFIG_CONFARGS} \ " # this cannot be used, because then chrpath is not found and only static lib is built @@ -143,7 +181,9 @@ FILES_${PN} += "${sbindir}/gpsd_ubx_fixed ${sbindir}/gpsd_ubx_settime" FILES_python-pygps-dbg += " ${libdir}/python*/site-packages/gps/.debug" RDEPENDS_${PN} = "gpsd-gpsctl bash" -RRECOMMENDS_${PN} = "gpsd-conf gpsd-udev gpsd-machine-conf" + +# gpsd-udev is for USB, which we are not using +RRECOMMENDS_${PN} = "gpsd-conf gpsd-machine-conf" SUMMARY_${PN}-udev = "udev relevant files to use gpsd hotplugging" FILES_${PN}-udev = "${base_libdir}/udev ${sysconfdir}/udev/*" -- cgit v1.2.3