summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-07-08 16:07:58 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-07-08 16:08:08 +0200
commit602aa55de36c884ad609a6d2116571a6c1bff60e (patch)
tree2a6cec5d3a057f9d4f6a62a99dc85779809ad7b3 /src
parent85dbd23f5e9908ea275c945303dfd1258a8b604e (diff)
first attempt to tune gpsd to nmea
Change-Id: I22f068aafcda1c9fb39692edaf64f303d2dcbf89 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/af-gps-binding.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/af-gps-binding.c b/src/af-gps-binding.c
index 93254df..c304160 100644
--- a/src/af-gps-binding.c
+++ b/src/af-gps-binding.c
@@ -851,6 +851,10 @@ static int connect_to(const char *host, const char *service, int isgpsd)
ERROR(afbitf, "can't connect to host %s, service %s", host, service);
return fd;
}
+ if (isgpsd) {
+ static const char gpsdsetup[] = "?WATCH={\"enable\":true,\"nmea\":true};\r\n";
+ write(fd, gpsdsetup, sizeof gpsdsetup - 1);
+ }
/* adds to the event loop */
rc = sd_event_add_io(afb_daemon_get_event_loop(afbitf->daemon), &source, fd, EPOLLIN, on_event, NULL);