summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-09 13:29:24 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-09 13:32:04 -0500
commit7c78d5fdc837d084d61169c975ec204fee604fcf (patch)
treed9bafb6f63d59a3495da47b2553dbe073b4b81be /libgpsd_core.c
parentdbf118b5dfef3359aa8c1dc76cda474339594c71 (diff)
downloadgpsd-7c78d5fdc837d084d61169c975ec204fee604fcf.tar.gz
Remove some remnants of the adaptive-delay experiment.
All regression tests pass.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c21
1 files changed, 0 insertions, 21 deletions
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",