diff options
-rw-r--r-- | driver_evermore.c | 4 | ||||
-rw-r--r-- | driver_garmin.c | 18 | ||||
-rw-r--r-- | driver_geostar.c | 5 | ||||
-rw-r--r-- | driver_italk.c | 31 | ||||
-rw-r--r-- | driver_navcom.c | 68 | ||||
-rw-r--r-- | driver_oncore.c | 42 | ||||
-rw-r--r-- | driver_proto.c | 30 | ||||
-rw-r--r-- | driver_sirf.c | 4 | ||||
-rw-r--r-- | driver_superstar2.c | 2 | ||||
-rw-r--r-- | driver_tsip.c | 5 | ||||
-rw-r--r-- | driver_ubx.c | 70 | ||||
-rw-r--r-- | drivers.c | 12 | ||||
-rw-r--r-- | gpsd.h-tail | 6 | ||||
-rw-r--r-- | gpsmon.c | 6 | ||||
-rw-r--r-- | net_ntrip.c | 2 | ||||
-rw-r--r-- | subframe.c | 8 |
16 files changed, 175 insertions, 138 deletions
diff --git a/driver_evermore.c b/driver_evermore.c index 5009ae04..f9fb01c1 100644 --- a/driver_evermore.c +++ b/driver_evermore.c @@ -361,12 +361,12 @@ gps_mask_t evermore_parse(struct gps_device_t * session, unsigned char *buf, return TIME_SET | PPSTIME_IS | RAW_IS; case 0x20: /* LogConfig Info, could be used as a probe for EverMore GPS */ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "LogConfig EverMore packet, length %zd\n", datalen); return ONLINE_SET; case 0x22: /* LogData */ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "LogData EverMore packet, length %zd\n", datalen); return ONLINE_SET; diff --git a/driver_garmin.c b/driver_garmin.c index 6a310e80..2ed68cf7 100644 --- a/driver_garmin.c +++ b/driver_garmin.c @@ -304,7 +304,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id, cpo_pvt_data *pvt = NULL; cpo_rcv_data *rmd = NULL; - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: PrintSERPacket(, %#02x, %#02x, )\n", pkt_id, pkt_len); session->cycle_end_reliable = true; @@ -521,7 +521,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id, case GARMIN_PKTID_RMD_DATA: case GARMIN_PKTID_RMD41_DATA: rmd = (cpo_rcv_data *) buf; - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: PVT RMD Data Sz: %d\n", pkt_len); gpsd_report(session->context->debug, LOG_PROG, "Garmin: PVT RMD rcvr_tow: %f, rcvr_wn: %d\n", @@ -614,7 +614,7 @@ gps_mask_t PrintSERPacket(struct gps_device_t *session, unsigned char pkt_id, pkt_id, pkt_len); break; } - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: PrintSERPacket(, %#02x, %#02x, )\n", pkt_id, pkt_len); return mask; @@ -754,7 +754,7 @@ static void Build_Send_USB_Packet(struct gps_device_t *session, theBytesReturned = gpsd_write(session, (const char *)thePacket, (size_t) theBytesToWrite); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: SendPacket(), wrote %zd bytes\n", theBytesReturned); @@ -827,7 +827,7 @@ static void Build_Send_SER_Packet(struct gps_device_t *session, theBytesReturned = gpsd_write(session, (const char *)thePacket, (size_t) theBytesToWrite); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: SendPacket(), wrote %zd bytes\n", theBytesReturned); @@ -1151,7 +1151,7 @@ gps_mask_t garmin_ser_parse(struct gps_device_t *session) } - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: garmin_ser_parse() Type: %#02x, Len: %#02x, chksum: %#02x\n", pkt_id, pkt_len, chksum); mask = PrintSERPacket(session, pkt_id, pkt_len, data_buf); @@ -1161,7 +1161,7 @@ gps_mask_t garmin_ser_parse(struct gps_device_t *session) (void)usleep(300); Send_ACK(); /*@ +usedef +compdef @*/ - gpsd_report(session->context->debug, LOG_IO, "Garmin: garmin_ser_parse( )\n"); + gpsd_report(session->context->debug, LOG_DATA, "Garmin: garmin_ser_parse( )\n"); return mask; } @@ -1189,7 +1189,7 @@ static void garmin_switcher(struct gps_device_t *session, int mode) ssize_t status = gpsd_write(session, switcher, sizeof(switcher)); /*@ -charint @*/ if (status == (ssize_t)sizeof(switcher)) { - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Garmin: => GPS: turn off binary %02x %02x %02x... \n", switcher[0], switcher[1], switcher[2]); } else { @@ -1277,7 +1277,7 @@ static int GetPacket(struct gps_device_t *session) session->driver.garmin.BufferLen = 0; session->packet.outbuflen = 0; - gpsd_report(session->context->debug, LOG_IO, "Garmin: GetPacket()\n"); + gpsd_report(session->context->debug, LOG_DATA, "Garmin: GetPacket()\n"); for (cnt = 0; cnt < 10; cnt++) { size_t pkt_size; diff --git a/driver_geostar.c b/driver_geostar.c index a5eb1447..fbe3f9f5 100644 --- a/driver_geostar.c +++ b/driver_geostar.c @@ -68,7 +68,8 @@ static int geostar_write(struct gps_device_t *session, session->msgbuflen = len * 4; - gpsd_report(session->context->debug, LOG_IO, "Sent GeoStar packet id 0x%x\n", id); + gpsd_report(session->context->debug, LOG_DATA, + "Sent GeoStar packet id 0x%x\n", id); if (gpsd_write(session, session->msgbuf, session->msgbuflen) != (ssize_t) session->msgbuflen) return -1; @@ -159,7 +160,7 @@ static gps_mask_t geostar_analyze(struct gps_device_t *session) (void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag), "ID%02x", id); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "GeoStar packet id 0x%02x length %d: %s\n", id, len, buf2); session->cycle_end_reliable = true; diff --git a/driver_italk.c b/driver_italk.c index 5520817f..24cc1209 100644 --- a/driver_italk.c +++ b/driver_italk.c @@ -291,39 +291,48 @@ static gps_mask_t italk_parse(struct gps_device_t *session, switch (type) { case ITALK_NAV_FIX: - gpsd_report(session->context->debug, LOG_IO, "iTalk NAV_FIX len %zu\n", len); + gpsd_report(session->context->debug, LOG_DATA, + "iTalk NAV_FIX len %zu\n", len); mask = decode_itk_navfix(session, buf, len) | (CLEAR_IS | REPORT_IS); break; case ITALK_PRN_STATUS: - gpsd_report(session->context->debug, LOG_IO, "iTalk PRN_STATUS len %zu\n", len); + gpsd_report(session->context->debug, LOG_DATA, + "iTalk PRN_STATUS len %zu\n", len); mask = decode_itk_prnstatus(session, buf, len); break; case ITALK_UTC_IONO_MODEL: - gpsd_report(session->context->debug, LOG_IO, "iTalk UTC_IONO_MODEL len %zu\n", len); + gpsd_report(session->context->debug, LOG_DATA, + "iTalk UTC_IONO_MODEL len %zu\n", len); mask = decode_itk_utcionomodel(session, buf, len); break; case ITALK_ACQ_DATA: - gpsd_report(session->context->debug, LOG_IO, "iTalk ACQ_DATA len %zu\n", len); + gpsd_report(session->context->debug, LOG_DATA, + "iTalk ACQ_DATA len %zu\n", len); break; case ITALK_TRACK: - gpsd_report(session->context->debug, LOG_IO, "iTalk TRACK len %zu\n", len); + gpsd_report(session->context->debug, LOG_DATA, + "iTalk TRACK len %zu\n", len); break; case ITALK_PSEUDO: - gpsd_report(session->context->debug, LOG_IO, "iTalk PSEUDO len %zu\n", len); + gpsd_report(session->context->debug, + LOG_DATA, "iTalk PSEUDO len %zu\n", len); mask = decode_itk_pseudo(session, buf, len); break; case ITALK_RAW_ALMANAC: - gpsd_report(session->context->debug, LOG_IO, "iTalk RAW_ALMANAC len %zu\n", len); + gpsd_report(session->context->debug, + LOG_DATA, "iTalk RAW_ALMANAC len %zu\n", len); break; case ITALK_RAW_EPHEMERIS: - gpsd_report(session->context->debug, LOG_IO, "iTalk RAW_EPHEMERIS len %zu\n", len); + gpsd_report(session->context->debug, + LOG_DATA, "iTalk RAW_EPHEMERIS len %zu\n", len); break; case ITALK_SUBFRAME: mask = decode_itk_subframe(session, buf, len); break; case ITALK_BIT_STREAM: - gpsd_report(session->context->debug, LOG_IO, "iTalk BIT_STREAM len %zu\n", len); + gpsd_report(session->context->debug, LOG_DATA, + "iTalk BIT_STREAM len %zu\n", len); break; case ITALK_AGC: @@ -357,12 +366,12 @@ static gps_mask_t italk_parse(struct gps_device_t *session, case ITALK_PULL_FIX: case ITALK_MEMCTRL: case ITALK_STOP_TASK: - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "iTalk not processing packet: id 0x%02x length %zu\n", type, len); break; default: - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "iTalk unknown packet: id 0x%02x length %zu\n", type, len); } diff --git a/driver_navcom.c b/driver_navcom.c index d013c05f..3cecbe86 100644 --- a/driver_navcom.c +++ b/driver_navcom.c @@ -148,8 +148,9 @@ static void navcom_cmd_0x1c(struct gps_device_t *session, uint8_t mode, putbyte(msg, 10, checksum(msg + 3, 7)); putbyte(msg, 11, 0x03); (void)navcom_send_cmd(session, msg, 12); - gpsd_report(session->context->debug, LOG_PROG, "Navcom: sent command 0x1c (Test Support Block)\n"); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_PROG, + "Navcom: sent command 0x1c (Test Support Block)\n"); + gpsd_report(session->context->debug, LOG_DATA, "Navcom: command 0x1c mode = %02x, length = %u\n", mode, length); } @@ -176,7 +177,7 @@ static void navcom_cmd_0x11(struct gps_device_t *session, (void)navcom_send_cmd(session, msg, 12); gpsd_report(session->context->debug, LOG_PROG, "Navcom: sent command 0x11 (Serial Port Configuration)\n"); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: serial port selection: 0x%02x\n", port_selection); } #endif /* RECONFIGURE_ENABLE */ @@ -220,7 +221,7 @@ static gps_mask_t handle_0x83(struct gps_device_t *session) * for determining the GPS-UTC time difference, * for which the iono data is not needed as far * as we are concerned. However, I am still - * reporting it (if debuglevel >= LOG_IO) as a + * reporting it (if debuglevel >= LOG_DATA) as a * matter of interest */ /* 2^-30 */ #define SF_A0 (0.000000000931322574615478515625) @@ -277,24 +278,25 @@ static gps_mask_t handle_0x83(struct gps_device_t *session) gpsd_report(session->context->debug, LOG_PROG, "Navcom: received packet type 0x83 (Ionosphere and UTC Data)\n"); - gpsd_report(session->context->debug, LOG_IO, "Navcom: Scaled parameters follow:\n"); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, + "Navcom: Scaled parameters follow:\n"); + gpsd_report(session->context->debug, LOG_DATA, "Navcom: GPS Week: %u, GPS Time of Week: %u (GPS Time: %f)\n", week, tow, week * 604800 + tow / 1000.0); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: a0: %12.4E, a1: %12.4E, a2: %12.4E, a3: %12.4E, " "b0: %12.4E, b1: %12.4E, b2: %12.4E, b3: %12.4E\n", (double)alpha0 * SF_ALPHA0, (double)alpha1 * SF_ALPHA1, (double)alpha2 * SF_ALPHA2, (double)alpha3 * SF_ALPHA3, (double)beta0 * SF_BETA0, (double)beta1 * SF_BETA1, (double)beta2 * SF_BETA2, (double)beta3 * SF_BETA3); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: A0: %19.12E, A1: %19.12E\n", (double)a0 * SF_A0, (double)a1 * SF_A1); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: UTC Ref. Time: %lu, UTC Ref. Week: %u, dTls: %d\n", (unsigned long)tot * SF_TOT, wnt, dtls); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: Week of leap seconds: %u, Day number of leap seconds: %u, dTlsf: %d\n", wnlsf, dn, dtlsf); @@ -323,7 +325,7 @@ static gps_mask_t handle_0x06(struct gps_device_t *session) gpsd_report(session->context->debug, LOG_PROG, "Navcom: received packet type 0x06 (Acknowledgement (without error))\n"); /*@ -type @*/ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: acknowledged command id 0x%02x on port %c\n", cmd_id, (port == 0 ? 'A' : (port == 1 ? 'B' : '?'))); /*@ +type @*/ @@ -343,12 +345,12 @@ static gps_mask_t handle_0x15(struct gps_device_t *session) for (n = 4; n < (msg_len - 2); n += 2) { uint8_t err_id = getub(buf, n); uint8_t err_desc = getub(buf, n + 1); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: error id = 0x%02x, error description = 0x%02x\n", err_id, err_desc); } port = getub(buf, n); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: negative acknowledge was for command id 0x%02x on port %c\n", cmd_id, (port == 0 ? 'A' : (port == 1 ? 'B' : '?'))); /*@ -type @*/ @@ -494,17 +496,17 @@ static gps_mask_t handle_0xb1(struct gps_device_t *session) gpsd_report(session->context->debug, LOG_PROG, "Navcom: received packet type 0xb1 (PVT Report)\n"); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, 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"), ((nav_mode & 0x03)!='\0' ? "DGPS" : "GPS")); /*@ +type @*/ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: latitude = %f, longitude = %f, altitude = %f, geoid = %f\n", session->newdata.latitude, session->newdata.longitude, session->newdata.altitude, session->gpsdata.separation); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: velocities: north = %f, east = %f, up = %f (track = %f, speed = %f)\n", vel_north * VEL_RES, vel_east * VEL_RES, vel_up * VEL_RES, session->newdata.track, session->newdata.speed); @@ -647,39 +649,39 @@ static gps_mask_t handle_0x81(struct gps_device_t *session) /* leap second? */ gpsd_report(session->context->debug, LOG_PROG, "Navcom: received packet type 0x81 (Packed Ephemeris Data)\n"); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: PRN: %u, Week: %u, TOW: %.3f SV clock bias/drift/drift rate: %#19.12E/%#19.12E/%#19.12E\n", prn, session->context->gps_week, session->context->gps_tow, ((double)af0) * SF_AF0, ((double)af1) * SF_AF1, ((double)af2) * SF_AF2); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: IODE (!AODE): %u Crs: %19.12e, Delta n: %19.12e, M0: %19.12e\n", iode, (double)crs * SF_CRS, (double)delta_n * SF_DELTA_N * GPS_PI, (double)m0 * SF_M0 * GPS_PI); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: Cuc: %19.12e, Eccentricity: %19.12e, Cus: %19.12e, A^1/2: %19.12e\n", (double)cuc * SF_CUC, (double)e * SF_E, (double)cus * SF_CUS, (double)sqrt_a * SF_SQRT_A); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: TOE: %u, Cic: %19.12e, Omega %19.12e, Cis: %19.12e\n", toe * SF_TOE, (double)cic * SF_CIC, (double)Omega0 * SF_OMEGA0 * GPS_PI, (double)cis * SF_CIS); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: i0: %19.12e, Crc: %19.12e, omega: %19.12e, Omega dot: %19.12e\n", (double)i0 * SF_I0 * GPS_PI, (double)crc * SF_CRC, (double)omega * SF_OMEGA * GPS_PI, (double)Omegadot * SF_OMEGADOT * GPS_PI); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: IDOT: %19.12e, Codes on L2: 0x%x, GPS Week: %u, L2 P data flag: %x\n", (double)idot * SF_IDOT * GPS_PI, cl2, week - (week % 1024) + wn, l2pd); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: SV accuracy: 0x%x, SV health: 0x%x, TGD: %f, IODC (!AODC): %u\n", ura, svh, (double)tgd * SF_TGD, iodc); - gpsd_report(session->context->debug, LOG_IO, "Navcom: Transmission time: %u\n", tow); + gpsd_report(session->context->debug, LOG_DATA, "Navcom: Transmission time: %u\n", tow); #undef SF_TGD #undef SF_TOC @@ -748,7 +750,7 @@ static gps_mask_t handle_0x86(struct gps_device_t *session) } /*@ -predboolothers @*/ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: engine status = 0x%x, almanac = %s, time = 0x%x, pos = 0x%x\n", eng_status & 0x07, (eng_status & 0x08 ? "valid" : "invalid"), eng_status & 0x30 >> 4, eng_status & 0xc0 >> 6); @@ -787,12 +789,12 @@ static gps_mask_t handle_0x86(struct gps_device_t *session) s = session->gpsdata.ss[i++] = (p2_snr ? p2_snr : ca_snr) / 4.0; /*@ end @*/ } - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: prn = %3u, ele = %02u, azm = %03u, snr = %d (%s), " "dgps age = %.1fs, log ch = %d, hw ch = 0x%02x\n", prn, ele, azm, s, (p2_snr ? "P2" : "C/A"), (double)dgps_age * 0.1, log_channel & 0x3f, hw_channel); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: sol. valid = %c, clock = %s, pos. = %s, " "height = %s, err. code = 0x%x\n", (sol_status & 0x01 ? 'Y' : 'N'), @@ -829,7 +831,7 @@ static gps_mask_t handle_0xb0(struct gps_device_t *session) gpsd_report(session->context->debug, LOG_PROG, "Navcom: received packet type 0xb0 (Raw Meas. Data Block)\n"); /*@ -predboolothers @*/ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: week = %u, tow = %.3f, time slew accumulator = %u (1/1023mS), status = 0x%02x " "(%sclock %s - %u blocks follow)\n", session->context->gps_week, @@ -867,17 +869,17 @@ static gps_mask_t handle_0xb0(struct gps_device_t *session) double p2 = (sv_status & 0x20 ? c1 + (double)p2_ca_pseudorange / 16.0 * LAMBDA_L1 : NAN); - gpsd_report(session->context->debug, LOG_IO + 1, + gpsd_report(session->context->debug, LOG_DATA + 1, "Navcom: >> sv status = 0x%02x (PRN %u - C/A & L1 %s - P1 %s - P2 & L2 %s)\n", sv_status, (sv_status & 0x1f), (sv_status & 0x80 ? "valid" : "invalid"), (sv_status & 0x40 ? "valid" : "invalid"), (sv_status & 0x20 ? "valid" : "invalid")); - gpsd_report(session->context->debug, LOG_IO + 1, + gpsd_report(session->context->debug, LOG_DATA + 1, "Navcom: >>> ch status = 0x%02x (Logical channel: %u - CA C/No: %u dBHz) " "sL1: %u, sL2: %u\n", ch_status, ch_status & 0x0f, ((ch_status & 0xf0) >> 4) + 35, l1_slips, l2_slips); - gpsd_report(session->context->debug, LOG_IO + 1, + gpsd_report(session->context->debug, LOG_DATA + 1, "Navcom: >>> C1: %14.3f, L1: %14.3f, L2: %14.3f, P1: %14.3f, P2: %14.3f\n", c1, l1, l2, p1, p2); /*@ +predboolothers -charint @*/ @@ -920,7 +922,7 @@ static gps_mask_t handle_0xb5(struct gps_device_t *session) (double)tow / 1000.0f); gpsd_report(session->context->debug, LOG_PROG, "Navcom: received packet type 0xb5 (Pseudorange Noise Statistics)\n"); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: epe = %f\n", session->gpsdata.epe); return mask; } else { @@ -1102,7 +1104,7 @@ static gps_mask_t handle_0xef(struct gps_device_t *session) osc_filter_drift_est = NAN; } - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "Navcom: oscillator temp. = %d, nav. status = 0x%02x, " "nav. clock offset = %f, nav. clock drift = %f, " "osc. filter drift est. = %f, acc.time slew value = %d\n", diff --git a/driver_oncore.c b/driver_oncore.c index 36e7a475..24f6b121 100644 --- a/driver_oncore.c +++ b/driver_oncore.c @@ -75,7 +75,8 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf, return 0; mask = ONLINE_SET; - gpsd_report(session->context->debug, LOG_IO, "oncore NAVSOL - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "oncore NAVSOL - navigation data\n"); flags = (unsigned char)getub(buf, 72); @@ -87,7 +88,8 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf, session->gpsdata.status = STATUS_FIX; session->newdata.mode = MODE_2D; } else { - gpsd_report(session->context->debug, LOG_WARN, "oncore NAVSOL no fix - flags 0x%02x\n", flags); + gpsd_report(session->context->debug, LOG_WARN, + "oncore NAVSOL no fix - flags 0x%02x\n", flags); session->newdata.mode = MODE_NO_FIX; session->gpsdata.status = STATUS_NO_FIX; } @@ -112,7 +114,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf, session->newdata.time = (timestamp_t)timegm(&unpacked_date) + nsec * 1e-9; /*@ +unrecog */ mask |= TIME_SET; - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "oncore NAVSOL - time: %04d-%02d-%02d %02d:%02d:%02d.%09d\n", unpacked_date.tm_year + 1900, unpacked_date.tm_mon + 1, unpacked_date.tm_mday, unpacked_date.tm_hour, @@ -128,7 +130,7 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf, dop = getbeu16(buf, 35) / 10.0f; /*@+type@*/ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "oncore NAVSOL - %lf %lf %.2lfm-%.2lfm | %.2fm/s %.1fdeg dop=%.1f\n", lat, lon, alt, wgs84_separation(lat, lon), speed, track, (float)dop); @@ -158,8 +160,8 @@ oncore_msg_navsol(struct gps_device_t *session, unsigned char *buf, sn = (int)getub(buf, off + 2); status = (int)getub(buf, off + 3); - gpsd_report(session->context->debug, LOG_IO, "%2d %2d %2d %3d %02x\n", i, sv, mode, sn, - status); + gpsd_report(session->context->debug, LOG_DATA, + "%2d %2d %2d %3d %02x\n", i, sv, mode, sn, status); if (sn) { session->gpsdata.PRN[st] = sv; @@ -236,7 +238,8 @@ oncore_msg_utc_offset(struct gps_device_t *session, unsigned char *buf, if (data_len != 8) return 0; - gpsd_report(session->context->debug, LOG_IO, "oncore UTCTIME - leap seconds\n"); + gpsd_report(session->context->debug, LOG_DATA, + "oncore UTCTIME - leap seconds\n"); utc_offset = (int)getub(buf, 4); if (utc_offset == 0) return 0; /* that part of almanac not received yet */ @@ -258,7 +261,7 @@ oncore_msg_pps_offset(struct gps_device_t *session, unsigned char *buf, if (data_len != 11) return 0; - gpsd_report(session->context->debug, LOG_IO, "oncore PPS offset\n"); + gpsd_report(session->context->debug, LOG_DATA, "oncore PPS offset\n"); pps_offset_ns = (int)getbes32(buf, 4); session->driver.oncore.pps_offset_ns = pps_offset_ns; @@ -278,9 +281,11 @@ oncore_msg_svinfo(struct gps_device_t *session, unsigned char *buf, if (data_len != 92) return 0; - gpsd_report(session->context->debug, LOG_IO, "oncore SVINFO - satellite data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "oncore SVINFO - satellite data\n"); nchan = (unsigned int)getub(buf, 4); - gpsd_report(session->context->debug, LOG_IO, "oncore SVINFO - %d satellites:\n", nchan); + gpsd_report(session->context->debug, LOG_DATA, + "oncore SVINFO - %d satellites:\n", nchan); /* Then we clamp the value to not read outside the table. */ if (nchan > 12) nchan = 12; @@ -293,7 +298,8 @@ oncore_msg_svinfo(struct gps_device_t *session, unsigned char *buf, int el = (int)getub(buf, off + 3); int az = (int)getbeu16(buf, off + 4); - gpsd_report(session->context->debug, LOG_IO, "%2d %2d %2d %3d\n", i, sv, el, az); + gpsd_report(session->context->debug, LOG_DATA, + "%2d %2d %2d %3d\n", i, sv, el, az); /* Store for use when Ea messages come. */ session->driver.oncore.PRN[i] = sv; @@ -307,7 +313,8 @@ oncore_msg_svinfo(struct gps_device_t *session, unsigned char *buf, } } - gpsd_report(session->context->debug, LOG_DATA, "SVINFO: mask={SATELLITE}\n"); + gpsd_report(session->context->debug, LOG_DATA, + "SVINFO: mask={SATELLITE}\n"); return SATELLITE_SET; } @@ -324,7 +331,8 @@ oncore_msg_time_raim(struct gps_device_t *session UNUSED, return 0; sawtooth_ns = (int)getub(buf, 25); - gpsd_report(session->context->debug, LOG_IO, "oncore PPS sawtooth: %d\n",sawtooth_ns); + gpsd_report(session->context->debug, LOG_DATA, + "oncore PPS sawtooth: %d\n",sawtooth_ns); /* session->driver.oncore.traim_sawtooth_ns = sawtooth_ns; */ @@ -358,7 +366,8 @@ gps_mask_t oncore_dispatch(struct gps_device_t * session, unsigned char *buf, type = ONCTYPE(buf[2], buf[3]); /* we may need to dump the raw packet */ - gpsd_report(session->context->debug, LOG_RAW, "raw Oncore packet type 0x%04x\n", type); + gpsd_report(session->context->debug, LOG_RAW, + "raw Oncore packet type 0x%04x\n", type); (void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag), "MOT-%c%c", type >> 8, type & 0xff); @@ -385,7 +394,8 @@ gps_mask_t oncore_dispatch(struct gps_device_t * session, unsigned char *buf, default: /* FIX-ME: This gets noisy in a hurry. Change once your driver works */ - gpsd_report(session->context->debug, LOG_WARN, "unknown packet id @@%c%c length %zd\n", + gpsd_report(session->context->debug, LOG_WARN, + "unknown packet id @@%c%c length %zd\n", type >> 8, type & 0xff, len); return 0; } @@ -419,7 +429,7 @@ static ssize_t oncore_control_send(struct gps_device_t *session, session->msgbuf[msglen + 4] = '\n'; session->msgbuflen = msglen + 5; - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "writing oncore control type %c%c\n", msg[0], msg[1]); return gpsd_write(session, session->msgbuf, session->msgbuflen); } diff --git a/driver_proto.c b/driver_proto.c index 319418fa..b85e3818 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -72,7 +72,8 @@ _proto__msg_navsol(struct gps_device_t *session, unsigned char *buf, size_t data if (data_len != _PROTO__NAVSOL_MSG_LEN) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ NAVSOL - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ NAVSOL - navigation data\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__SOLUTION_VALID) == 0) @@ -120,7 +121,8 @@ _proto__msg_navsol(struct gps_device_t *session, unsigned char *buf, size_t data * the fields it potentially set and the transfer mask. Doing this * makes it relatively easy to track down data-management problems. */ - gpsd_report(session->context->debug, LOG_DATA, "NAVSOL: time=%.2f, lat=%.2f lon=%.2f alt=%.2f mode=%d status=%d\n", + gpsd_report(session->context->debug, LOG_DATA, + "NAVSOL: time=%.2f, lat=%.2f lon=%.2f alt=%.2f mode=%d status=%d\n", session->newdata.time, session->newdata.latitude, session->newdata.longitude, @@ -142,7 +144,8 @@ _proto__msg_utctime(struct gps_device_t *session, unsigned char *buf, size_t dat if (data_len != UTCTIME_MSG_LEN) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ UTCTIME - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ UTCTIME - navigation data\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__TIME_VALID) == 0) @@ -168,7 +171,8 @@ _proto__msg_svinfo(struct gps_device_t *session, unsigned char *buf, size_t data if (data_len != SVINFO_MSG_LEN ) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ SVINFO - navigation data\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ SVINFO - navigation data\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__SVINFO_VALID) == 0) @@ -183,7 +187,8 @@ _proto__msg_svinfo(struct gps_device_t *session, unsigned char *buf, size_t data */ nchan = GET_NUMBER_OF_CHANNELS(); if ((nchan < 1) || (nchan > MAXCHANNELS)) { - gpsd_report(session->context->debug, LOG_INF, "too many channels reported\n"); + gpsd_report(session->context->debug, LOG_INF, + "too many channels reported\n"); return 0; } gpsd_zero_satellites(&session->gpsdata); @@ -226,7 +231,8 @@ _proto__msg_raw(struct gps_device_t *session, unsigned char *buf, size_t data_le if (data_len != RAW_MSG_LEN ) return 0; - gpsd_report(session->context->debug, LOG_IO, "_proto_ RAW - raw measurements\n"); + gpsd_report(session->context->debug, LOG_DATA, + "_proto_ RAW - raw measurements\n"); /* if this protocol has a way to test message validity, use it */ flags = GET_FLAGS(); if ((flags & _PROTO__SVINFO_VALID) == 0) @@ -241,7 +247,8 @@ _proto__msg_raw(struct gps_device_t *session, unsigned char *buf, size_t data_le */ nchan = GET_NUMBER_OF_CHANNELS(); if ((nchan < 1) || (nchan > MAXCHANNELS)) { - gpsd_report(session->context->debug, LOG_INF, "too many channels reported\n"); + gpsd_report(session->context->debug, LOG_INF, + "too many channels reported\n"); return 0; } @@ -285,7 +292,8 @@ gps_mask_t _proto__dispatch(struct gps_device_t *session, unsigned char *buf, si type = GET_MESSAGE_TYPE(); /* we may need to dump the raw packet */ - gpsd_report(session->context->debug, LOG_RAW, "raw _proto_ packet type 0x%02x\n", type); + gpsd_report(session->context->debug, LOG_RAW, + "raw _proto_ packet type 0x%02x\n", type); /* * The tag field is only 8 bytes; be careful you do not overflow. @@ -299,7 +307,8 @@ gps_mask_t _proto__dispatch(struct gps_device_t *session, unsigned char *buf, si /* Deliver message to specific decoder based on message type */ default: - gpsd_report(session->context->debug, LOG_WARN, "unknown packet id %d length %d\n", type, len); + gpsd_report(session->context->debug, LOG_WARN, + "unknown packet id %d length %d\n", type, len); return 0; } } @@ -349,7 +358,8 @@ static ssize_t _proto__control_send(struct gps_device_t *session, /* we may need to dump the message */ return gpsd_write(session, session->msgbuf, session->msgbuflen); - gpsd_report(session->context->debug, LOG_IO, "writing _proto_ control type %02x\n"); + gpsd_report(session->context->debug, LOG_DATA, + "writing _proto_ control type %02x\n"); return gpsd_write(session, session->msgbuf, session->msgbuflen); } /*@ -charint +usedef +compdef @*/ diff --git a/driver_sirf.c b/driver_sirf.c index 87705e22..a2eaa752 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -241,7 +241,7 @@ static bool sirf_write(struct gps_device_t *session, unsigned char *msg) msg[len + 5] = (unsigned char)(crc & 0x00ff); gpsd_report(session->context->debug, - LOG_IO, "SiRF: Writing control type %02x:\n", msg[4]); + LOG_DATA, "SiRF: Writing control type %02x:\n", msg[4]); ok = (gpsd_write(session, (const char *)msg, len+8) == (ssize_t) (len+8)); return (ok); } @@ -515,7 +515,7 @@ static gps_mask_t sirf_msg_navdata(struct gps_device_t *session, words[i] = (uint32_t)getbeu32(buf, 4 * i + 3); } - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "SiRF: NavData chan %u svid %u\n",chan,svid); #ifdef RECONFIGURE_ENABLE diff --git a/driver_superstar2.c b/driver_superstar2.c index 667788f0..4a4c2cd5 100644 --- a/driver_superstar2.c +++ b/driver_superstar2.c @@ -376,7 +376,7 @@ superstar2_write(struct gps_device_t *session, char *msg, size_t msglen) c += 0x100; msg[(int)msg[3] + 4] = (char)((c >> 8) & 0xff); msg[(int)msg[3] + 5] = (char)(c & 0xff); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "writing superstar2 control type %d len %zu\n", (int)msg[1] & 0x7f, msglen); return gpsd_write(session, msg, msglen); diff --git a/driver_tsip.c b/driver_tsip.c index bb878de8..a8af1722 100644 --- a/driver_tsip.c +++ b/driver_tsip.c @@ -55,7 +55,8 @@ static int tsip_write(struct gps_device_t *session, *ep++ = '\x03'; session->msgbuflen = (size_t) (ep - session->msgbuf); /*@ -charint @*/ - gpsd_report(session->context->debug, LOG_IO, "Sent TSIP packet id 0x%02x\n", id); + gpsd_report(session->context->debug, LOG_DATA, + "Sent TSIP packet id 0x%02x\n", id); if (gpsd_write(session, session->msgbuf, session->msgbuflen) != (ssize_t) session->msgbuflen) return -1; @@ -162,7 +163,7 @@ static gps_mask_t tsip_parse_input(struct gps_device_t *session) (void)snprintf(session->gpsdata.tag, sizeof(session->gpsdata.tag), "ID%02x", id = (unsigned)session->packet.outbuffer[1]); - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "TSIP packet id 0x%02x length %d: %s\n", id, len, buf2); (void)time(&now); diff --git a/driver_ubx.c b/driver_ubx.c index 5ef314d6..edd94d24 100644 --- a/driver_ubx.c +++ b/driver_ubx.c @@ -357,13 +357,13 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, data_len = (size_t) getles16(buf, 4); switch (msgid) { case UBX_NAV_POSECEF: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_POSECEF\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_POSECEF\n"); break; case UBX_NAV_POSLLH: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_POSLLH\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_POSLLH\n"); break; case UBX_NAV_STATUS: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_STATUS\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_STATUS\n"); break; case UBX_NAV_DOP: gpsd_report(session->context->debug, LOG_PROG, "UBX_NAV_DOP\n"); @@ -376,41 +376,41 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, data_len) | (CLEAR_IS | REPORT_IS); break; case UBX_NAV_POSUTM: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_POSUTM\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_POSUTM\n"); break; case UBX_NAV_VELECEF: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_VELECEF\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_VELECEF\n"); break; case UBX_NAV_VELNED: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_VELNED\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_VELNED\n"); break; case UBX_NAV_TIMEGPS: gpsd_report(session->context->debug, LOG_PROG, "UBX_NAV_TIMEGPS\n"); mask = ubx_msg_nav_timegps(session, &buf[UBX_PREFIX_LEN], data_len); break; case UBX_NAV_TIMEUTC: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_TIMEUTC\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_TIMEUTC\n"); break; case UBX_NAV_CLOCK: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_CLOCK\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_CLOCK\n"); break; case UBX_NAV_SVINFO: gpsd_report(session->context->debug, LOG_PROG, "UBX_NAV_SVINFO\n"); mask = ubx_msg_nav_svinfo(session, &buf[UBX_PREFIX_LEN], data_len); break; case UBX_NAV_DGPS: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_DGPS\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_DGPS\n"); break; case UBX_NAV_SBAS: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_SBAS\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_SBAS\n"); ubx_msg_sbas(session, &buf[6]); break; case UBX_NAV_EKFSTATUS: - gpsd_report(session->context->debug, LOG_IO, "UBX_NAV_EKFSTATUS\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_NAV_EKFSTATUS\n"); break; case UBX_RXM_RAW: - gpsd_report(session->context->debug, LOG_IO, "UBX_RXM_RAW\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_RXM_RAW\n"); break; case UBX_RXM_SFRB: mask = ubx_msg_sfrb(session, &buf[UBX_PREFIX_LEN]); @@ -419,44 +419,44 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, gpsd_report(session->context->debug, LOG_PROG, "UBX_RXM_SVSI\n"); break; case UBX_RXM_ALM: - gpsd_report(session->context->debug, LOG_IO, "UBX_RXM_ALM\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_RXM_ALM\n"); break; case UBX_RXM_EPH: - gpsd_report(session->context->debug, LOG_IO, "UBX_RXM_EPH\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_RXM_EPH\n"); break; case UBX_RXM_POSREQ: - gpsd_report(session->context->debug, LOG_IO, "UBX_RXM_POSREQ\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_RXM_POSREQ\n"); break; case UBX_MON_SCHED: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_SCHED\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_SCHED\n"); break; case UBX_MON_IO: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_IO\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_IO\n"); break; case UBX_MON_IPC: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_IPC\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_IPC\n"); break; case UBX_MON_VER: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_VER\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_VER\n"); break; case UBX_MON_EXCEPT: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_EXCEPT\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_EXCEPT\n"); break; case UBX_MON_MSGPP: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_MSGPP\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_MSGPP\n"); break; case UBX_MON_RXBUF: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_RXBUF\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_RXBUF\n"); break; case UBX_MON_TXBUF: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_TXBUF\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_TXBUF\n"); break; case UBX_MON_HW: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_HW\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_HW\n"); break; case UBX_MON_USB: - gpsd_report(session->context->debug, LOG_IO, "UBX_MON_USB\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_MON_USB\n"); break; case UBX_INF_DEBUG: @@ -478,26 +478,26 @@ gps_mask_t ubx_parse(struct gps_device_t * session, unsigned char *buf, break; case UBX_TIM_TP: - gpsd_report(session->context->debug, LOG_IO, "UBX_TIM_TP\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_TIM_TP\n"); break; case UBX_TIM_TM: - gpsd_report(session->context->debug, LOG_IO, "UBX_TIM_TM\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_TIM_TM\n"); break; case UBX_TIM_TM2: - gpsd_report(session->context->debug, LOG_IO, "UBX_TIM_TM2\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_TIM_TM2\n"); break; case UBX_TIM_SVIN: - gpsd_report(session->context->debug, LOG_IO, "UBX_TIM_SVIN\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX_TIM_SVIN\n"); break; case UBX_ACK_NAK: - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "UBX_ACK_NAK, class: %02x, id: %02x\n", buf[UBX_CLASS_OFFSET], buf[UBX_TYPE_OFFSET]); break; case UBX_ACK_ACK: - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "UBX_ACK_ACK, class: %02x, id: %02x\n", buf[UBX_CLASS_OFFSET], buf[UBX_TYPE_OFFSET]); @@ -572,7 +572,7 @@ bool ubx_write(struct gps_device_t * session, /*@ +type @*/ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "=> GPS: UBX class: %02x, id: %02x, len: %zd, crc: %02x%02x\n", msg_class, msg_id, data_len, CK_A, CK_B); @@ -600,7 +600,7 @@ static void ubx_event_hook(struct gps_device_t *session, event_t event) else if (event == event_identified) { unsigned char msg[32]; - gpsd_report(session->context->debug, LOG_IO, "UBX configure\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX configure\n"); /*@ -type @*/ msg[0] = 0x03; /* SBAS mode enabled, accept testbed mode */ @@ -629,7 +629,7 @@ static void ubx_event_hook(struct gps_device_t *session, event_t event) }; /* reserved */ /*@ +type @*/ - gpsd_report(session->context->debug, LOG_IO, "UBX revert\n"); + gpsd_report(session->context->debug, LOG_DATA, "UBX revert\n"); /* Reverting all in one fast and reliable reset */ (void)ubx_write(session, 0x06, 0x04, msg, 4); /* CFG-RST */ @@ -916,7 +916,7 @@ static bool ubx_rate(struct gps_device_t *session, double cycletime) if (cycletime < 200.0) cycletime = 200.0; - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "UBX rate change, report every %f secs\n", cycletime); s = (unsigned short)cycletime; msg[0] = (unsigned char)(s >> 8); @@ -39,9 +39,11 @@ gps_mask_t generic_parse_input(struct gps_device_t *session) char *sentence = (char *)session->packet.outbuffer; if (sentence[strlen(sentence)-1] != '\n') - gpsd_report(session->context->debug, LOG_IO, "<= GPS: %s\n", sentence); + gpsd_report(session->context->debug, LOG_IO, + "<= GPS: %s\n", sentence); else - gpsd_report(session->context->debug, LOG_IO, "<= GPS: %s", sentence); + gpsd_report(session->context->debug, LOG_IO, + "<= GPS: %s", sentence); if ((st=nmea_parse(sentence, session)) == 0) { gpsd_report(session->context->debug, LOG_WARN, @@ -706,10 +708,12 @@ static bool tnt_send(struct gps_device_t *session, const char *fmt, ...) va_end(ap); sent = tnt_control_send(session, buf, strlen(buf)); if (sent == (ssize_t) strlen(buf)) { - gpsd_report(session->context->debug, LOG_IO, "=> GPS: %s\n", buf); + gpsd_report(session->context->debug, LOG_IO, + "=> GPS: %s\n", buf); return true; } else { - gpsd_report(session->context->debug, LOG_WARN, "=> GPS: %s FAILED\n", buf); + gpsd_report(session->context->debug, LOG_WARN, + "=> GPS: %s FAILED\n", buf); return false; } } diff --git a/gpsd.h-tail b/gpsd.h-tail index b9c46d5e..50404475 100644 --- a/gpsd.h-tail +++ b/gpsd.h-tail @@ -703,9 +703,9 @@ struct gps_device_t { #define LOG_SHOUT 0 /* not an error but we should always see it */ #define LOG_WARN 1 /* not errors but may indicate a problem */ #define LOG_INF 2 /* key informative messages */ -#define LOG_DATA 3 /* log data management messages */ -#define LOG_PROG 4 /* progress messages */ -#define LOG_IO 5 /* IO to and from devices */ +#define LOG_PROG 3 /* progress messages */ +#define LOG_IO 4 /* IO to and from devices */ +#define LOG_DATA 5 /* log data management messages */ #define LOG_SPIN 6 /* logging for catching spin bugs */ #define LOG_RAW 7 /* raw low-level I/O */ @@ -263,15 +263,15 @@ void gpsd_report(const int debuglevel, const int errlevel, const char *fmt, ...) case LOG_INF: err_str = "INFO: "; break; - case LOG_DATA: - err_str = "DATA: "; - break; case LOG_PROG: err_str = "PROG: "; break; case LOG_IO: err_str = "IO: "; break; + case LOG_DATA: + err_str = "DATA: "; + break; case LOG_SPIN: err_str = "SPIN: "; break; diff --git a/net_ntrip.c b/net_ntrip.c index cd1078b2..31dd8c20 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -229,7 +229,7 @@ static int ntrip_sourcetable_parse(struct gps_device_t *device) if (!(eol = strstr(line, NTRIP_BR))) break; - gpsd_report(device->context->debug, LOG_IO, + gpsd_report(device->context->debug, LOG_DATA, "next Ntrip source table line %s\n", line); *eol = '\0'; @@ -44,7 +44,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session, * word is inverted. * */ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "50B: gpsd_interpret_subframe_raw: " "%08x %08x %08x %08x %08x %08x %08x %08x %08x %08x\n", words[0], words[1], words[2], words[3], words[4], @@ -55,7 +55,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session, words[0] ^= 0x3fffffc0; /* invert */ } else if (preamble != 0x74) { /* strangely this is very common, so don't log it */ - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "50B: gpsd_interpret_subframe_raw: bad preamble 0x%x\n", preamble); return 0; @@ -72,7 +72,7 @@ gps_mask_t gpsd_interpret_subframe_raw(struct gps_device_t *session, } parity = (uint32_t)isgps_parity((isgps30bits_t)words[i]); if (parity != (words[i] & 0x3f)) { - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "50B: gpsd_interpret_subframe_raw parity fail words[%d] 0x%x != 0x%x\n", i, parity, (words[i] & 0x1)); return 0; @@ -164,7 +164,7 @@ gps_mask_t gpsd_interpret_subframe(struct gps_device_t *session, /* FIXME!! I really doubt this is Big Endian compatible */ uint8_t preamble; struct subframe_t *subp = &session->gpsdata.subframe; - gpsd_report(session->context->debug, LOG_IO, + gpsd_report(session->context->debug, LOG_DATA, "50B: gpsd_interpret_subframe: (%d) " "%06x %06x %06x %06x %06x %06x %06x %06x %06x %06x\n", tSVID, words[0], words[1], words[2], words[3], words[4], |