summaryrefslogtreecommitdiff
path: root/recipes-extended/multitech
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-01-03 10:49:27 -0600
committerJohn Klug <john.klug@multitech.com>2019-07-03 17:08:20 -0500
commit421181d3873de02a2f7476cc192c447457dd5e47 (patch)
tree77f9b583c87bc8ad8b702ccadb1bef6e06d53fc3 /recipes-extended/multitech
parent1e96c1d91f91c797c81a78465f7f66f8785a83e3 (diff)
downloadmeta-mlinux-421181d3873de02a2f7476cc192c447457dd5e47.tar.gz
meta-mlinux-421181d3873de02a2f7476cc192c447457dd5e47.tar.bz2
meta-mlinux-421181d3873de02a2f7476cc192c447457dd5e47.zip
Add nmea interval setup to venux-gps utility.
Diffstat (limited to 'recipes-extended/multitech')
-rw-r--r--recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch79
-rw-r--r--recipes-extended/multitech/venus-gps_0.1.0.bb6
2 files changed, 83 insertions, 2 deletions
diff --git a/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch b/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch
new file mode 100644
index 0000000..41ce262
--- /dev/null
+++ b/recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch
@@ -0,0 +1,79 @@
+From 35e865bbe72085260bd48fdc65eba0887fe32360 Mon Sep 17 00:00:00 2001
+From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
+Date: Thu, 3 Jan 2019 09:32:41 +0200
+Subject: [PATCH] fix setting of NMEA sentences intervals, add --quit parameter
+
+---
+ src/venus_gps.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/src/venus_gps.c b/src/venus_gps.c
+index 77c7e73..2f6bf44 100644
+--- a/src/venus_gps.c
++++ b/src/venus_gps.c
+@@ -788,6 +788,8 @@ static void usage(FILE * out)
+ fprintf(out, " --gpzda 0-255 (default: 1) |\n");
+ #endif
+ fprintf(out, " --gpvtg 0-255 (default: 1)\n");
++ fprintf(out, "\n");
++ fprintf(out, " --quit \n");
+ fprintf(out, " }\n");
+ fprintf(out, "\n");
+ }
+@@ -819,6 +821,7 @@ enum {
+ OPT_SERIAL_CLIENT,
+ OPT_ID_PREFIX,
+ OPT_ID,
++ OPT_QUIT
+ };
+
+ static char *short_options = "b:d:p:f";
+@@ -852,6 +855,7 @@ static struct option long_options[] = {
+ {"longitude", 1, 0, OPT_LONGITUDE},
+ {"altitude", 1, 0, OPT_ALTITUDE},
+ #endif
++ {"quit", 0, 0, OPT_QUIT},
+ {"version", 0, NULL, OPT_VERSION},
+ {"help", 0, NULL, OPT_HELP},
+ {0, 0, 0, 0},
+@@ -864,6 +868,7 @@ int main(int argc, char *argv[])
+ char *cp;
+ int option_index;
+ int tty;
++ int quit =0;
+ struct venus_msg msg;
+
+ struct socket_client_args *sc;
+@@ -883,6 +888,10 @@ int main(int argc, char *argv[])
+ daemonize = 1;
+ break;
+
++ case OPT_QUIT:
++ quit = 1;
++ break;
++
+ case OPT_DEVICE:
+ device = optarg;
+ break;
+@@ -1145,7 +1154,7 @@ int main(int argc, char *argv[])
+ }
+ #endif
+
+- tmp = venus_conf_nmea(tty, 1, 1, 1, 1, 1, 1, 0, UPDATE_ATTR_SRAM);
++ tmp = venus_conf_nmea(tty, gpgga, gpgsa, gpgsv, gpgll, gprmc, gpvtg, 0, UPDATE_ATTR_SRAM);
+ if (tmp < 0) {
+ log_error("failed to configure nmea sentences");
+ exit(1);
+@@ -1158,6 +1167,9 @@ int main(int argc, char *argv[])
+ }
+
+ venus_close(tty);
++ if (quit) {
++ exit(0);
++ }
+
+ sigset_t sigset;
+ sigemptyset(&sigset);
+--
+2.7.4
+
diff --git a/recipes-extended/multitech/venus-gps_0.1.0.bb b/recipes-extended/multitech/venus-gps_0.1.0.bb
index a518297..55d7325 100644
--- a/recipes-extended/multitech/venus-gps_0.1.0.bb
+++ b/recipes-extended/multitech/venus-gps_0.1.0.bb
@@ -4,9 +4,11 @@ SECTION = "console/network"
PRIORITY = "optional"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-PR = "r0"
+PR = "r1"
-SRC_URI = "git://git.multitech.net/venus-gps.git;protocol=git;tag=${PV}"
+SRC_URI = "git://git.multitech.net/venus-gps.git;protocol=git;tag=${PV} \
+ file://fix_nmea_intervals.patch \
+ "
S = "${WORKDIR}/git"
inherit autotools