From f57255209c5b25c74e1fd5c84b6636bf76f02298 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 26 Aug 2009 22:38:40 +0000 Subject: Eliminate a couple more gps_query() uses. --- xgps.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'xgps.c') 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); -- cgit v1.2.1