AP_GPS: fixed multiple GPS detection bug

This commit is contained in:
Andrew Tridgell 2012-12-20 14:48:26 +11:00
parent fb4540a349
commit 4a6b46c661
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ AP_GPS_Auto::_detect(void)
detect_started_ms = hal.scheduler->millis();
}
while (_port->available() > 0) {
while (_port->available() > 0 && new_gps == NULL) {
uint8_t data = _port->read();
if (AP_GPS_UBLOX::_detect(data)) {
hal.console->print_P(PSTR(" ublox "));