From 7c78d5fdc837d084d61169c975ec204fee604fcf Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 9 Feb 2015 13:29:24 -0500 Subject: Remove some remnants of the adaptive-delay experiment. All regression tests pass. --- libgpsd_core.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index dcf268fa..7d8d16fe 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -300,9 +300,6 @@ void gps_context_init(struct gps_context_t *context, .shmexport = NULL, #endif /* SHM_EXPORT_ENABLE */ .serial_write = gpsd_serial_write, - .inbytesavg = 0.0, - .inbyteswpos = (char) 0, - .selectbug = false }; /*@ +initallelements +nullassign +nullderef +fullinitblock @*/ /* *INDENT-ON* */ @@ -1199,24 +1196,6 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) newlen = generic_get(session); } - /* Calculate window average of read count */ - session->context->inbyteswpos = session->context->inbyteswpos % WINDOW_AVG_SIZE; - alpha = (session->context->inbyteswpos== (unsigned char) 0) ? 0.0f:1.0f; - if (newlen > 0) - session->context->inbytesavg = alpha*session->context->inbytesavg + (float) newlen; - else - /* error reading -- counts as 0 */ - session->context->inbytesavg = alpha*session->context->inbytesavg; - - if (session->context->inbyteswpos== (unsigned char) (WINDOW_AVG_SIZE-1)) { - session->context->inbytesavg/=WINDOW_AVG_SIZE; - } - session->context->inbyteswpos += (unsigned char) 1; - - gpsd_report(&session->context->errout, LOG_RAW, - "window average of received byte count is %f\n", - session->context->inbytesavg); - /* update the scoreboard structure from the GPS */ gpsd_report(&session->context->errout, LOG_RAW + 2, "%s sent %zd new characters\n", -- cgit v1.2.1