summaryrefslogtreecommitdiff
path: root/driver_sirf.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2019-01-11 15:06:55 -0800
committerGary E. Miller <gem@rellim.com>2019-01-11 15:06:55 -0800
commit92fb16b8ee308379a8689a7813f98b33480e4197 (patch)
treea5eb3d1a5855b21d24283983e93623aefa374161 /driver_sirf.c
parent2301be0f90134bab5f02505241a48a88aef9a2be (diff)
downloadgpsd-92fb16b8ee308379a8689a7813f98b33480e4197.tar.gz
driver_sirf: Minor comment a logging changes.
Change "control type" to MID. Start to document QZSS
Diffstat (limited to 'driver_sirf.c')
-rw-r--r--driver_sirf.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/driver_sirf.c b/driver_sirf.c
index 3940a0c5..21b71050 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -254,7 +254,8 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg)
/* can also be false because ACK was received after last send */
if (session->driver.sirf.need_ack > 0) {
gpsd_log(&session->context->errout, LOG_WARN,
- "SiRF: warning, write of control type %02x while awaiting ACK for %02x.\n",
+ "SiRF: warning, write of MID %02x while "
+ "awaiting ACK for %02x.\n",
type, session->driver.sirf.need_ack);
}
@@ -272,7 +273,7 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg)
msg[len + 5] = (unsigned char)(crc & 0x00ff);
gpsd_log(&session->context->errout, LOG_PROG,
- "SiRF: Writing control type %02x:\n", type);
+ "SiRF: Writing MID %02x:\n", type);
ok = (gpsd_write(session, (const char *)msg, len+8) == (ssize_t) (len+8));
session->driver.sirf.need_ack = type;
@@ -849,8 +850,10 @@ static gps_mask_t sirf_msg_67_16(struct gps_device_t *session,
*/
switch (gnssId_sirf) {
case 0:
- /* GPS, 1-32 maps to 1-32 */
- /* and QZSS maps how??? */
+ /* GPS, 1-32 maps to 1-32
+ * 173 to 182: QZSS IMES
+ * 183 to 187: QZSS SAIF
+ * 193 to 202: QZSS */
gnssId = 0;
PRN = svId;
break;
@@ -1065,17 +1068,19 @@ static gps_mask_t sirf_msg_tcxo(struct gps_device_t *session,
return mask;
}
+/* Software Version String MID 6
+ * response to Poll Software Version MID 132 */
static gps_mask_t sirf_msg_swversion(struct gps_device_t *session,
unsigned char *buf, size_t len)
{
double fv;
unsigned char *cp;
- if (len < 20)
+ if (len < 1)
return 0;
- (void)strlcpy(session->subtype, (char *)buf + 1,
- sizeof(session->subtype));
+ (void)strlcpy(session->subtype, (char *)buf + 1, sizeof(session->subtype));
+
for (cp = buf+1; *cp!=(unsigned char)'\0' && isdigit(*cp)==0; cp++)
continue;
fv = safe_atof((const char *)cp);