AP_GPS: start detection timer on first bytes

this prevents a uBlox plugged in late from being detected as a NMEA
GPS
This commit is contained in:
Andrew Tridgell 2012-11-05 14:30:36 +11:00
parent 6f9fa7d3b3
commit 72e97c6dfc

View File

@ -79,7 +79,7 @@ AP_GPS_Auto::_detect(void)
{
static uint32_t detect_started_ms;
if (detect_started_ms == 0) {
if (detect_started_ms == 0 && _port->available() > 0) {
detect_started_ms = millis();
}