summaryrefslogtreecommitdiff
path: root/xgps.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2009-08-26 22:38:40 +0000
committerEric S. Raymond <esr@thyrsus.com>2009-08-26 22:38:40 +0000
commitf57255209c5b25c74e1fd5c84b6636bf76f02298 (patch)
tree0e9c29e629ad96baedf3b3e12e73212f8d26169d /xgps.c
parent81953ce8e31192d659f6405b28ba3db946d69899 (diff)
downloadgpsd-f57255209c5b25c74e1fd5c84b6636bf76f02298.tar.gz
Eliminate a couple more gps_query() uses.
Diffstat (limited to 'xgps.c')
-rw-r--r--xgps.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/xgps.c b/xgps.c
index 4a354e7c..1c66f251 100644
--- a/xgps.c
+++ b/xgps.c
@@ -1075,19 +1075,17 @@ handle_gps(XtPointer client_data UNUSED, XtIntervalId *ignored UNUSED)
}
gps_timeout = XtAppAddTimeOut(app, 1000, handle_gps, app);
} else {
+ gps_mask_t mask;
timeout = XtAppAddTimeOut(app, 2000, handle_time_out, app);
timer = time(NULL);
gps_set_raw_hook(gpsdata, update_panel);
- /*
- * We could use gps_stream() here, but coding it this way
- * gives us a forced test of new protocol.
- */
+ // WATCH_NEWSTYLE forces new protocol, for test purposes
+ mask = WATCH_ENABLE|WATCH_RAW|WATCH_NEWSTYLE;
if (jitteropt)
- (void)gps_query(gpsdata, "?WATCH={\"enable\":true,\"buffer_policy\":1,\"raw\":1};");
- else
- (void)gps_query(gpsdata, "?WATCH={\"enable\":true,\"buffer_policy\":0,\"raw\":1};");
+ mask |= WATCH_NOJITTER;
+ (void)gps_stream(gpsdata, mask);
gps_input = XtAppAddInput(app, gpsdata->gps_fd,
(XtPointer)XtInputReadMask, handle_input, NULL);