diff options
-rw-r--r-- | cgps.c | 2 | ||||
-rw-r--r-- | driver_ais.c | 6 | ||||
-rw-r--r-- | driver_garmin.c | 10 | ||||
-rw-r--r-- | driver_garmin_txt.c | 2 | ||||
-rw-r--r-- | driver_navcom.c | 6 | ||||
-rw-r--r-- | driver_nmea2000.c | 22 | ||||
-rw-r--r-- | driver_oncore.c | 2 | ||||
-rw-r--r-- | driver_sirf.c | 12 | ||||
-rw-r--r-- | driver_superstar2.c | 2 | ||||
-rw-r--r-- | driver_tsip.c | 26 | ||||
-rw-r--r-- | driver_ubx.c | 6 | ||||
-rw-r--r-- | driver_zodiac.c | 2 | ||||
-rw-r--r-- | drivers.c | 10 |
13 files changed, 54 insertions, 54 deletions
@@ -785,7 +785,7 @@ int main(int argc, char *argv[]) /* wait 1/2 second for gpsd */ if (!gps_waiting(&gpsdata, 500000)) { /* 240 tries at .5 Sec a try is a 2 minute timeout */ - if ( 240 < wait_clicks++ ) + if ( 240 < wait_clicks++ ) die(GPS_TIMEOUT); } else { wait_clicks = 0; diff --git a/driver_ais.c b/driver_ais.c index 20b4a6ad..d1371c5a 100644 --- a/driver_ais.c +++ b/driver_ais.c @@ -172,7 +172,7 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout, ais->type6.dac = UBITS(72, 10); ais->type6.fid = UBITS(82, 6); ais->type6.bitcount = bitlen - 88; - /* not strictly required - helps stability in testing */ + /* not strictly required - helps stability in testing */ (void)memset(ais->type6.bitdata, '\0', sizeof(ais->type6.bitdata)); ais->type6.structured = false; /* Inland AIS */ @@ -440,7 +440,7 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout, ais->type8.dac = UBITS(40, 10); ais->type8.fid = UBITS(50, 6); ais->type8.bitcount = bitlen - 56; - /* not strictly required - helps stability in testing */ + /* not strictly required - helps stability in testing */ (void)memset(ais->type8.bitdata, '\0', sizeof(ais->type8.bitdata)); ais->type8.structured = false; if (ais->type8.dac == 1) @@ -653,7 +653,7 @@ bool ais_binary_decode(const struct gpsd_errout_t *errout, ais->type8.dac200fid10.heading_q = (bool)UBITS(159, 1); /* skip 8 bits */ /* - * Attempt to prevent false matches with this message type + * Attempt to prevent false matches with this message type * by range-checking certain fields. */ if (ais->type8.dac200fid10.hazard > DAC200FID10_HAZARD_MAX diff --git a/driver_garmin.c b/driver_garmin.c index 36c0806f..787e5205 100644 --- a/driver_garmin.c +++ b/driver_garmin.c @@ -351,7 +351,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id, ver = get_uint16((uint8_t *) & buf[2]); maj_ver = (int)(ver / 100); min_ver = (int)(ver - (maj_ver * 100)); - gpsd_log(&session->context->errout, LOG_PROG, + gpsd_log(&session->context->errout, LOG_PROG, "Garmin: Appl, Product Data, sz: %d\n", pkt_len); (void)snprintf(session->subtype, sizeof(session->subtype), @@ -603,7 +603,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id, pkt_len); for (i = 0; i < pkt_len; i += 3) { gpsd_log(&session->context->errout, LOG_INF, - "Garmin: %c%03d\n", + "Garmin: %c%03d\n", buf[i], get_uint16((uint8_t *) & buf[i + 1])); } break; @@ -690,7 +690,7 @@ static gps_mask_t PrintUSBPacket(struct gps_device_t *session, Packet_t * pkt) switch (pkt->mPacketId) { case PRIV_PKTID_SET_MODE: prod_id = get_uint16(&pkt->mData.uchars[0]); - gpsd_log(&session->context->errout, LOG_PROG, + gpsd_log(&session->context->errout, LOG_PROG, "Garmin: Private, Set Mode: %d\n", prod_id); break; case PRIV_PKTID_INFO_REQ: @@ -997,7 +997,7 @@ static void garmin_event_hook(struct gps_device_t *session, event_t event) #if USE_RMD // turn on RMD data 110 - gpsd_log(&session->context->errout, LOG_PROG, + gpsd_log(&session->context->errout, LOG_PROG, "Garmin: Set to send Raw sat data\n"); Build_Send_SER_Packet(session, GARMIN_LAYERID_APPL, GARMIN_PKTID_L001_COMMAND_DATA, 2, @@ -1065,7 +1065,7 @@ gps_mask_t garmin_ser_parse(struct gps_device_t *session) chksum += pkt_len; if ('\x10' == pkt_len) { if ('\x10' != buf[n++]) { - gpsd_log(&session->context->errout, LOG_RAW + 1, + gpsd_log(&session->context->errout, LOG_RAW + 1, "Garmin: Bad pkt_len %#02x\n", pkt_len); Send_NAK(); return 0; diff --git a/driver_garmin_txt.c b/driver_garmin_txt.c index d7781159..8631ee3c 100644 --- a/driver_garmin_txt.c +++ b/driver_garmin_txt.c @@ -140,7 +140,7 @@ invalid data. **************************************************************************/ static int gar_decode(const struct gps_context_t *context, - const char *data, const size_t length, + const char *data, const size_t length, const char *prefix, const double dividor, double *result) { diff --git a/driver_navcom.c b/driver_navcom.c index 601ee0ee..e34a8b80 100644 --- a/driver_navcom.c +++ b/driver_navcom.c @@ -471,9 +471,9 @@ static gps_mask_t handle_0xb1(struct gps_device_t *session) if (tdop != DOP_UNDEFINED) session->gpsdata.dop.tdop = tdop / 10.0; - gpsd_log(&session->context->errout, LOG_PROG, + gpsd_log(&session->context->errout, LOG_PROG, "Navcom: received packet type 0xb1 (PVT Report)\n"); - gpsd_log(&session->context->errout, LOG_DATA, + gpsd_log(&session->context->errout, LOG_DATA, "Navcom: navigation mode %s (0x%02x) - %s - %s\n", ((-nav_mode & 0x80)!='\0' ? "invalid" : "valid"), nav_mode, ((nav_mode & 0x40)!='\0' ? "3D" : "2D"), @@ -744,7 +744,7 @@ static gps_mask_t handle_0x86(struct gps_device_t *session) * B2-B3: P1 tracking status * B4-B5: P2 tracking status * 00 Acquisition or reacquisition - * 01 Code loop locked + * 01 Code loop locked * 02 Costas loop locked * 11 Full tracking with aiding and active * multipath reduction - all data is valid diff --git a/driver_nmea2000.c b/driver_nmea2000.c index 3e5a26b4..3af734ca 100644 --- a/driver_nmea2000.c +++ b/driver_nmea2000.c @@ -105,7 +105,7 @@ static gps_mask_t get_mode(struct gps_device_t *session) } else { session->newdata.mode = MODE_NOT_SEEN; } - + if (session->driver.nmea2000.mode_valid & 2) { return MODE_SET | USED_IS; } else { @@ -513,7 +513,7 @@ static gps_mask_t hnd_129039(unsigned char *bu, int len, PGN *pgn, struct gps_de ais->type18.course = (unsigned int) ais_direction((unsigned int) getleu16(bu, 14), 10.0); ais->type18.speed = (unsigned int) (getleu16(bu, 16) * MPS_TO_KNOTS * 0.01 / 0.1); ais->type18.radio = (unsigned int) (getleu32(bu, 18) & 0x7ffff); - ais->type18.heading = (unsigned int) ais_direction((unsigned int) getleu16(bu, 21), 1.0); + ais->type18.heading = (unsigned int) ais_direction((unsigned int) getleu16(bu, 21), 1.0); ais->type18.reserved = 0; ais->type18.regional = (unsigned int) ((bu[24] >> 0) & 0x03); ais->type18.cs = (bool) ((bu[24] >> 2) & 0x01); @@ -671,7 +671,7 @@ static gps_mask_t hnd_129794(unsigned char *bu, int len, PGN *pgn, struct gps_de ais->type5.to_starboard, ais->type5.draught/10.0); printf("AIS: arival:%-20.20s at %02u-%02u-%04d %02u:%0u\n", - ais->type5.destination, + ais->type5.destination, ais->type5.day, ais->type5.month, date2.tm_year+1900, @@ -946,7 +946,7 @@ static gps_mask_t hnd_127245(unsigned char *bu, int len, PGN *pgn, struct gps_de static gps_mask_t hnd_127250(unsigned char *bu, int len, PGN *pgn, struct gps_device_t *session) { int aux; - + print_data(session->context, bu, len, pgn); session->gpsdata.attitude.heading = getleu16(bu, 1) * RAD_2_DEG * 0.0001; @@ -1306,7 +1306,7 @@ static void find_pgn(struct can_frame *frame, struct gps_device_t *session) if (!session->driver.nmea2000.unit_valid) { unsigned int l1, l2; - + for (l1=0;l1<NMEA2000_NETS;l1++) { for (l2=0;l2<NMEA2000_UNITS;l2++) { if (session == nmea2000_units[l1][l2]) { @@ -1522,7 +1522,7 @@ int nmea2000_open(struct gps_device_t *session) return -1; } for (l = 0; l < NMEA2000_NETS; l++) { - if (strncmp(can_interface_name[l], + if (strncmp(can_interface_name[l], interface_name, MIN(sizeof(interface_name), sizeof(can_interface_name[l]))) == 0) { can_net = l; @@ -1536,7 +1536,7 @@ int nmea2000_open(struct gps_device_t *session) } } else { for (l = 0; l < NMEA2000_NETS; l++) { - if (strncmp(can_interface_name[l], + if (strncmp(can_interface_name[l], interface_name, MIN(sizeof(interface_name), sizeof(can_interface_name[l]))) == 0) { gpsd_log(&session->context->errout, LOG_ERROR, "NMEA2000 open: CAN device duplicate open: %s .\n", interface_name); @@ -1558,7 +1558,7 @@ int nmea2000_open(struct gps_device_t *session) /* Create the socket */ sock = socket(PF_CAN, SOCK_RAW, CAN_RAW); - + if (BAD_SOCKET(sock)) { gpsd_log(&session->context->errout, LOG_ERROR, "NMEA2000 open: can not get socket.\n"); @@ -1608,11 +1608,11 @@ int nmea2000_open(struct gps_device_t *session) session->driver.nmea2000.unit_valid = true; } else { strncpy(can_interface_name[can_net], - interface_name, + interface_name, MIN(sizeof(can_interface_name[0]), sizeof(interface_name))); session->driver.nmea2000.unit_valid = false; for (l=0;l<NMEA2000_UNITS;l++) { - nmea2000_units[can_net][l] = NULL; + nmea2000_units[can_net][l] = NULL; } } @@ -1633,7 +1633,7 @@ void nmea2000_close(struct gps_device_t *session) if (session->driver.nmea2000.unit_valid) { unsigned int l1, l2; - + for (l1=0;l1<NMEA2000_NETS;l1++) { for (l2=0;l2<NMEA2000_UNITS;l2++) { if (session == nmea2000_units[l1][l2]) { diff --git a/driver_oncore.c b/driver_oncore.c index c27e08b0..a023529a 100644 --- a/driver_oncore.c +++ b/driver_oncore.c @@ -191,7 +191,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf, session->gpsdata.skyview[st].PRN = (short)session->driver.oncore.PRN[j]; session->gpsdata.skyview[st].elevation = (short)session->driver.oncore.elevation[j]; - session->gpsdata.skyview[st].azimuth = + session->gpsdata.skyview[st].azimuth = (short)session->driver.oncore.azimuth[j]; st++; } diff --git a/driver_sirf.c b/driver_sirf.c index 0d0448b5..e3699c8f 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -173,7 +173,7 @@ static unsigned char disablesubframe[] = { /* 0x00 turns off MIDs 7, 8, 17, 28, 29, 30 and 31 */ 0x00, /* reset bit map */ - + 0x00, 0x00, 0xb0, 0xb3 }; @@ -246,7 +246,7 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg) /* * Control strings spaced too closely together confuse the SiRF * IV. This wasn't an issue on older SiRFs, but they've gone to a - * lower-powered processor that apparently has trouble keeping up. + * lower-powered processor that apparently has trouble keeping up. * Now you have to wait for the ACK, otherwise chaos ensues. * Add instrumentation to reveal when this may happen. */ @@ -272,7 +272,7 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg) gpsd_log(&session->context->errout, LOG_PROG, "SiRF: Writing control type %02x:\n", type); ok = (gpsd_write(session, (const char *)msg, len+8) == (ssize_t) (len+8)); - + session->driver.sirf.need_ack = type; return (ok); } @@ -1399,7 +1399,7 @@ static void sirfbin_event_hook(struct gps_device_t *session, event_t event) if (event == event_configure) { #ifdef __UNUSED__ - /* might not be time for the next init string yet */ + /* might not be time for the next init string yet */ if (session->driver.sirf.need_ack > 0) return; #endif /* UNUSED */ @@ -1490,10 +1490,10 @@ static void sirfbin_event_hook(struct gps_device_t *session, event_t event) break; case 11: - /* + /* * Disable navigation debug messages (the value 5 is magic) * must be done *after* subframe enable. - */ + */ gpsd_log(&session->context->errout, LOG_PROG, "SiRF: disable MID 7, 28, 29, 30, 31.\n"); putbyte(unsetmidXX, 5, 0x05); diff --git a/driver_superstar2.c b/driver_superstar2.c index c28b849f..6e197d3c 100644 --- a/driver_superstar2.c +++ b/driver_superstar2.c @@ -289,7 +289,7 @@ superstar2_msg_measurement(struct gps_device_t *session, unsigned char *buf, gpsd_log(&session->context->errout, LOG_PROG, "superstar2 #23 - measurement block\n"); - + n = (int)getub(buf, 6); /* number of measurements */ if ((n < 1) || (n > MAXCHANNELS)) { gpsd_log(&session->context->errout, LOG_INF, diff --git a/driver_tsip.c b/driver_tsip.c index 037ba39f..476c7348 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -182,7 +182,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) /* * FIXME: We could get both kinds of version info. */ - u1 = (uint8_t) getub(buf, 0); + u1 = (uint8_t) getub(buf, 0); if (u1 == 0x81) { /* Software Version Information */ uint8_t u6, u7; u2 = getub(buf, 2); /* Major version */ @@ -201,7 +201,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) "sw %u %u %u %02u.%02u.%04u %s", u2, u3, u4, u6, u5, s1, buf2); gpsd_log(&session->context->errout, LOG_INF, - "Software version: %s\n", + "Software version: %s\n", session->subtype); mask |= DEVICEID_SET; @@ -223,7 +223,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) "hw %u %02u.%02u.%04u %02u %u %s", ul1, u2, u3, s1, u4, s2, buf2); gpsd_log(&session->context->errout, LOG_INF, - "Hardware version: %s\n", + "Hardware version: %s\n", session->subtype); mask |= DEVICEID_SET; @@ -285,15 +285,15 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) break; (void)snprintf(session->subtype, sizeof(session->subtype), "%d.%d %02d%02d%02d %d.%d %02d%02d%02d", - getub(buf, 0), - getub(buf, 1), - getub(buf, 4), + getub(buf, 0), + getub(buf, 1), + getub(buf, 4), getub(buf, 2), getub(buf, 3), getub(buf, 5), - getub(buf, 6), + getub(buf, 6), getub(buf, 9), - getub(buf, 7), + getub(buf, 7), getub(buf, 8)); gpsd_log(&session->context->errout, LOG_INF, "Software version: %s\n", session->subtype); @@ -361,7 +361,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) mask |= TIME_SET | PPSTIME_IS; } mask |= LATLON_SET | ALTITUDE_SET | CLEAR_IS | REPORT_IS; - gpsd_log(&session->context->errout, LOG_DATA, + gpsd_log(&session->context->errout, LOG_DATA, "SPPLLA 0x4a time=%.2f lat=%.2f lon=%.2f alt=%.2f\n", session->newdata.time, session->newdata.latitude, @@ -435,7 +435,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) "GPS Velocity ENU %f %f %f %f %f\n", f1, f2, f3, f4, f5); mask |= SPEED_SET | TRACK_SET | CLIMB_SET; - gpsd_log(&session->context->errout, LOG_DATA, + gpsd_log(&session->context->errout, LOG_DATA, "VFENU 0x56 time=%.2f speed=%.2f track=%.2f climb=%.2f\n", session->newdata.time, session->newdata.speed, @@ -889,7 +889,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) } mask |= LATLON_SET | ALTITUDE_SET | MODE_SET | REPORT_IS; - gpsd_log(&session->context->errout, LOG_DATA, + gpsd_log(&session->context->errout, LOG_DATA, "SP-TPS 0xac time=%.2f lat=%.2f lon=%.2f alt=%.2f\n", session->newdata.time, session->newdata.latitude, @@ -994,8 +994,8 @@ static void tsip_init_query(struct gps_device_t *session) /* Request Hardware Version Information */ putbyte(buf, 0, 0x03); /* Subcode */ (void)tsip_write(session, 0x1c, buf, 1); - /* - * After HW information packet is received, a + /* + * After HW information packet is received, a * decision is made how to configure the device. */ } diff --git a/driver_ubx.c b/driver_ubx.c index dd5ecbda..fe509463 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -98,7 +98,7 @@ ubx_msg_mon_ver(struct gps_device_t *session, unsigned char *buf, /* save SW and HW Version as subtype */ (void)snprintf(obuf, sizeof(obuf), - "SW %.30s,HW %.10s", + "SW %.30s,HW %.10s", (char *)&buf[UBX_MESSAGE_DATA_OFFSET + 0], (char *)&buf[UBX_MESSAGE_DATA_OFFSET + 30]); @@ -116,7 +116,7 @@ ubx_msg_mon_ver(struct gps_device_t *session, unsigned char *buf, } /* save what we can */ (void)strlcpy(session->subtype, obuf, sizeof(session->subtype)); - + /* output SW and HW Version at LOG_INFO */ gpsd_log(&session->context->errout, LOG_INF, "UBX_MON_VER: %.*s\n", @@ -139,7 +139,7 @@ ubx_msg_nav_pvt(struct gps_device_t *session, unsigned char *buf, flags = (unsigned int)getub(buf, 21); /* TODO: finish decoding UBX_MON_PVT - * no need until depreacaed UBX_MON_SOL is dead + * no need until depreacaed UBX_MON_SOL is dead */ gpsd_log(&session->context->errout, LOG_DATA, "NAV-PVT: flags:%02x\n", flags); diff --git a/driver_zodiac.c b/driver_zodiac.c index 9d97bbf8..8304b87f 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -56,7 +56,7 @@ static ssize_t end_write(int fd, void *d, size_t len) size_t n; for (n = 0; n < (size_t)(len/2); n++) - putle16(buf, n*2, data[n]); + putle16(buf, n*2, data[n]); return write(fd, (char*)buf, len); } @@ -667,7 +667,7 @@ static ssize_t tnt_control_send(struct gps_device_t *session, if (*p == '@') { p++; - } + } #ifdef __UNUSED__ else { gpsd_log(&session->context->errout, LOG_ERROR, @@ -780,7 +780,7 @@ const struct gps_type_t driver_trueNorth = { * **************************************************************************/ -static int oceanserver_send(struct gpsd_errout_t *errout, +static int oceanserver_send(struct gpsd_errout_t *errout, const int fd, const char *fmt, ...) { int status; @@ -981,7 +981,7 @@ static gps_mask_t rtcm104v3_analyze(struct gps_device_t *session) gpsd_log(&session->context->errout, LOG_RAW, "RTCM 3.x packet %d\n", type); rtcm3_unpack(session->context, - &session->gpsdata.rtcm3, + &session->gpsdata.rtcm3, (char *)session->lexer.outbuffer); session->cycle_end_reliable = true; return RTCM3_SET; @@ -1099,7 +1099,7 @@ static void mtk3301_event_hook(struct gps_device_t *session, event_t event) (void)nmea_send(session, "$PMTK301,2"); /* DGPS is WAAS */ (void)nmea_send(session, "$PMTK313,1"); /* SBAS enable */ - /* PMTK_API_Q_OUTPUT_CTL - Query PPS pulse width - Trimble only? + /* PMTK_API_Q_OUTPUT_CTL - Query PPS pulse width - Trimble only? * http://trl.trimble.com/docushare/dsweb/Get/Document-482603/CONDOR_UG_2C_75263-00.pdf * * badly documented */ (void)nmea_send(session, "$PMTK424"); @@ -1346,7 +1346,7 @@ static gps_mask_t aivdm_analyze(struct gps_device_t *session) if (session->lexer.type == AIVDM_PACKET) { if (aivdm_decode ((char *)session->lexer.outbuffer, session->lexer.outbuflen, - session, &session->gpsdata.ais, + session, &session->gpsdata.ais, session->context->errout.debug)) { return ONLINE_SET | AIS_SET; } else |