diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-22 10:41:41 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-22 10:41:41 +0000 |
commit | dd91927d2d3cec26d7efecd06f6b4dec3cc267d4 (patch) | |
tree | 02aecb30e91693bb2d548c4dde9c3a1c48dbd099 | |
parent | 4f516f26ed53fc2a1760770ab34daf6493002ae1 (diff) | |
download | gpsd-dd91927d2d3cec26d7efecd06f6b4dec3cc267d4.tar.gz |
Prep work for 16-channel receivers; silence a warning about PPS initialization.
-rw-r--r-- | TODO | 11 | ||||
-rw-r--r-- | gpsd.spec.in | 2 | ||||
-rw-r--r-- | gpsutils.c | 8 | ||||
-rw-r--r-- | ntpshm.c | 3 | ||||
-rw-r--r-- | sirfmon.c | 4 |
5 files changed, 13 insertions, 15 deletions
@@ -4,13 +4,12 @@ will unfold them again. ** Bugs: -*** Various things are unhappy in the TSIP driverr +*** EPH and EPV reports are zeroed too often in the TSIP driver -EPH and EPV reports are zeroed too often in the TSIP code. There is -some bad interaction between the policy code in libgpsd_core.c and the -driver that we haven't figured out. +There is some bad interaction between the policy code in +libgpsd_core.c and the driver that we haven't figured out. -*** PPS code is flaky +*** PPS code is flaky, possibly due to a pthreads bug Some code attempting to terminate the PPS-monutoring thread when there is no DCD (e.g., on a USB device) seems to have tickled some kind of @@ -85,7 +84,7 @@ Rob recommends: I have not yet reproduced this. -*** Possible resource-leak bug, not yet reproduced or confirmed. +*** Possible resource-leak bug, not yet reproduced or confirmed Wojciech Kazubski <wk@ire.pw.edu.pl> reports: when I connect to gpsd first time everything goes fine, and several clients can connect without diff --git a/gpsd.spec.in b/gpsd.spec.in index 516a0099..c152836e 100644 --- a/gpsd.spec.in +++ b/gpsd.spec.in @@ -122,7 +122,7 @@ cp gps.py "$RPM_BUILD_ROOT"%{_libdir}/python${PYVERSION}/site-packages %{_libdir}/X11/app-defaults/xgpsspeed %changelog -* Tue Jun 21 2005 Eric S. Raymond <esr@snark.thyrsus.com> - @VERSION@-1 +* Wed Jun 22 2005 Eric S. Raymond <esr@snark.thyrsus.com> - @VERSION@-1 - Time DOP and total DOP are now passed on from GPSes that report them. Ensure longitude has a leading zero when <100, for compatibility with gpsdrive. Synchronous and thread hooks are now @@ -9,6 +9,8 @@ #include "gpsd.h" +#define MONTHSPERYEAR 12 /* months per calendar year */ + void gps_clear_fix(/*@ out @*/struct gps_fix_t *fixp) /* stuff a fix structure with recognizable out-of-band values */ { @@ -71,12 +73,12 @@ time_t mkgmtime(register struct tm *t) { register int year; register time_t result; - static const int cumdays[12] = + static const int cumdays[MONTHSPERYEAR] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; /*@ +matchanyintegral @*/ - year = 1900 + t->tm_year + t->tm_mon / 12; - result = (year - 1970) * 365 + cumdays[t->tm_mon % 12]; + year = 1900 + t->tm_year + t->tm_mon / MONTHSPERYEAR; + result = (year - 1970) * 365 + cumdays[t->tm_mon % MONTHSPERYEAR]; result += (year - 1968) / 4; result -= (year - 1900) / 100; result += (year - 1600) / 400; @@ -78,7 +78,7 @@ int ntpshm_init(struct gps_context_t *context, bool enablepps) # ifdef PPS_ENABLE context->shmTimePPS = enablepps; # endif /* PPS_ENABLE */ - return 1; + return enablepps; } int ntpshm_alloc(struct gps_context_t *context) @@ -101,7 +101,6 @@ int ntpshm_alloc(struct gps_context_t *context) return -1; } - bool ntpshm_free(struct gps_context_t *context, int segment) /* free NTP SHM segment */ { @@ -61,8 +61,6 @@ extern int netlib_connectsock(const char *, const char *, const char *); #define END1 0xb0 #define END2 0xb3 -#define MAXCHANNELS 12 - #define RAD2DEG (180.0/PI) /* how many characters to look at when trying to find baud rate lock */ @@ -442,7 +440,7 @@ static void decode_sirf(unsigned char buf[], int len) total 2 x 12 = 24 bytes ******************************************************************/ display(mid27win, 1, 14, "%d (%s)", getub(buf, 1), sbasvec[(int)getub(buf, 1)]); - for (i = j = 0; i < MAXCHANNELS; i++) { + for (i = j = 0; i < 12; i++) { if (/*@i1@*/getub(buf, 16+2*i) != '\0') { (void)wprintw(mid27win, "%d=%d ", getub(buf, 16+2*i), getub(buf, 16+2*i+1)); j++; |