static void evermore_configurator(struct gps_device_t *session, unsigned int seq) { gpsd_report(LOG_PROG, "evermore_configurator(%d)\n", seq); (void) evermore_nmea_config(session, 1); /* configure NMEA messages for gpsd (GPGSV every 5s) */ if (seq == 0) { if (session->packet.type == NMEA_PACKET) { gpsd_report(LOG_WARN, "NMEA_PACKET packet\n"); } (void) evermore_mode(session, 1); /* switch GPS to binary mode */ session->back_to_nmea = true; } }
static void evermore_event_hook(struct gps_device_t *session, event_t event) { /* * FIX-ME: It might not be necessary to call this on reactivate. * Experiment to see if the holds its settings through a close. */ if (event == event_identified || event == event_reactivate) { if (session->packet.type == NMEA_PACKET) { (void)evermore_nmea_config(session, 1); /* configure NMEA messages for gpsd (GPGSV every 5s) */ } (void)evermore_mode(session, 1); /* switch GPS to binary mode */ session->back_to_nmea = true; } else if (event == event_deactivate) { (void)evermore_nmea_config(session, 0); /* configure NMEA messages to default */ } }
static void evermore_event_hook(struct gps_device_t *session, event_t event) { if (session->context->readonly) return; /* * FIX-ME: It might not be necessary to call this on reactivate. * Experiment to see if the holds its settings through a close. */ if (event == event_identified || event == event_reactivate) { /* * We used to run this driver in binary mode, but that has the * problem that Evermore binary mode doesn't report a * leap-second correction in the Navigation Data Out sentence. * So, run it in NMEA mode to getbUTC corrected by firmware. * Fortunately the Evermore firmware interprets binary * commands in NMEA mode, so nothing else needs to change. */ (void)evermore_mode(session, 0); /* switch GPS to NMEA mode */ (void)evermore_nmea_config(session, 1); /* configure NMEA messages for gpsd (GPGSV every 5s) */ session->back_to_nmea = false; } else if (event == event_deactivate) { (void)evermore_nmea_config(session, 0); /* configure NMEA messages to default */ } }