mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
AP_GPS: use probing when probing for GPS, add detected message
This commit is contained in:
parent
b2898ca1d3
commit
494d72503a
@ -999,6 +999,14 @@ void AP_GPS::update_instance(uint8_t instance)
|
||||
tnow = state[instance].last_corrected_gps_time_us/1000U;
|
||||
state[instance].corrected_timestamp_updated = false;
|
||||
}
|
||||
|
||||
// we set delta_time_ms to the timeout value when clearing
|
||||
// state; use it being zero to mark first message
|
||||
if (!state[instance].announced_detection) {
|
||||
state[instance].announced_detection = true;
|
||||
GCS_SEND_TEXT(MAV_SEVERITY_INFO, "GPS %d: detected %s", instance + 1, drivers[instance]->name());
|
||||
}
|
||||
|
||||
// delta will only be correct after parsing two messages
|
||||
timing[instance].delta_time_ms = tnow - timing[instance].last_message_time_ms;
|
||||
timing[instance].last_message_time_ms = tnow;
|
||||
|
@ -212,6 +212,7 @@ public:
|
||||
float undulation; //<height that WGS84 is above AMSL at the current location
|
||||
bool have_undulation; ///<do we have a value for the undulation
|
||||
uint32_t last_gps_time_ms; ///< the system time we got the last GPS timestamp, milliseconds
|
||||
bool announced_detection; ///< true once we have announced GPS has been seen to the user
|
||||
uint64_t last_corrected_gps_time_us;///< the system time we got the last corrected GPS timestamp, microseconds
|
||||
bool corrected_timestamp_updated; ///< true if the corrected timestamp has been updated
|
||||
uint32_t lagged_sample_count; ///< number of samples with 50ms more lag than expected
|
||||
|
@ -136,7 +136,7 @@ void AP_GPS_Backend::_detection_message(char *buffer, const uint8_t buflen) cons
|
||||
|
||||
if (dstate.auto_detected_baud) {
|
||||
hal.util->snprintf(buffer, buflen,
|
||||
"GPS %d: detected as %s at %d baud",
|
||||
"GPS %d: probing for %s at %d baud",
|
||||
instance + 1,
|
||||
name(),
|
||||
int(gps._baudrates[dstate.current_baud]));
|
||||
|
Loading…
Reference in New Issue
Block a user