diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2006-12-15 00:50:16 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2006-12-15 00:50:16 +0000 |
commit | da5f3ad0df0cc5f23d8b0f58dc5b31631577c269 (patch) | |
tree | 93b755929994c4d0ea0fe021e8df7cd390ab657b /drivers.c | |
parent | bf3c7dfe628624d4a73cc6077663504c34d0edd8 (diff) | |
download | gpsd-da5f3ad0df0cc5f23d8b0f58dc5b31631577c269.tar.gz |
Diego Burge's driver builds, but it messes up some regression tests...
...(notably the TSIP ones). There's a conflict...
Diffstat (limited to 'drivers.c')
-rw-r--r-- | drivers.c | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -20,7 +20,7 @@ ssize_t generic_get(struct gps_device_t *session) return packet_get(session->gpsdata.gps_fd, &session->packet); } -#if defined(NMEA_ENABLE) || defined(SIRF_ENABLE) || defined(EVERMORE_ENABLE) || defined(ITALK_ENABLE) +#if defined(NMEA_ENABLE) || defined(SIRF_ENABLE) || defined(EVERMORE_ENABLE) || defined(ITALK_ENABLE) || defined(NAVCOM_ENABLE) ssize_t pass_rtcm(struct gps_device_t *session, char *buf, size_t rtcmbytes) /* most GPSes take their RTCM corrections straight up */ { @@ -55,7 +55,15 @@ gps_mask_t nmea_parse_input(struct gps_device_t *session) #else return 0; #endif /* EVERMORE_ENABLE */ - } else if (session->packet.type == GARMIN_PACKET) { + } else if (session->packet.type == NAVCOM_PACKET) { + gpsd_report(LOG_WARN, "Navcom packet seen when NMEA expected.\n"); +#ifdef NAVCOM_ENABLE + (void)gpsd_switch_driver(session, "Navcom binary"); + return navcom_parse(session, session->packet.outbuffer, session->packet.outbuflen); +#else + return 0; +#endif /* NAVCOM_ENABLE */ +} else if (session->packet.type == GARMIN_PACKET) { gpsd_report(LOG_WARN, "Garmin packet seen when NMEA expected.\n"); #ifdef GARMIN_ENABLE /* we might never see a trigger, have this as a backstop */ @@ -823,6 +831,7 @@ static struct gps_type_t rtcm104 = { extern struct gps_type_t garmin_usb_binary, garmin_ser_binary; extern struct gps_type_t sirf_binary, tsip_binary; extern struct gps_type_t evermore_binary, italk_binary; +extern struct gps_type_t navcom_binary; /*@ -nullassign @*/ /* the point of this rigamarole is to not have to export a table size */ @@ -848,6 +857,9 @@ static struct gps_type_t *gpsd_driver_array[] = { #ifdef ZODIAC_ENABLE &zodiac_binary, #endif /* ZODIAC_ENABLE */ +#ifdef NAVCOM_ENABLE + &navcom_binary, +#endif /* NAVCOM_ENABLE */ #ifdef GARMIN_ENABLE &garmin_usb_binary, &garmin_ser_binary, |