diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/af-gps-binding.c | 4 |
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); |