diff options
Diffstat (limited to 'recipes-extended/multitech/venus-gps')
-rw-r--r-- | recipes-extended/multitech/venus-gps/fix_nmea_intervals.patch | 79 |
1 files changed, 79 insertions, 0 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 + |