Fix T1000-E GPS - some changes went missing from #4303? (#4328)

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp

* Update GPS.cpp
This commit is contained in:
Mark Trevor Birss 2024-07-25 20:05:03 +02:00 committed by GitHub
parent c5f2d2736d
commit 1481ce987e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -400,9 +400,16 @@ bool GPS::setup()
int msglen = 0;
if (!didSerialInit) {
#ifdef GNSS_AIROHA
if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) {
probe(GPS_BAUDRATE);
LOG_INFO("GPS setting to %d.\n", GPS_BAUDRATE);
}
#else
#if !defined(GPS_UC6580)
if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) {
// if GPS_BAUDRATE is specified in variant (i.e. not 9600), skip to the specified rate.
if (speedSelect == 0 && GPS_BAUDRATE != serialSpeeds[speedSelect]) {
speedSelect = std::find(serialSpeeds, std::end(serialSpeeds), GPS_BAUDRATE) - serialSpeeds;
@ -423,6 +430,9 @@ bool GPS::setup()
} else {
gnssModel = GNSS_MODEL_UNKNOWN;
}
#else
gnssModel = GNSS_MODEL_UC6580;
#endif
if (gnssModel == GNSS_MODEL_MTK) {
/*
@ -774,6 +784,7 @@ bool GPS::setup()
LOG_INFO("GNSS module configuration saved!\n");
}
}
#endif
didSerialInit = true;
}
@ -1789,4 +1800,4 @@ void GPS::toggleGpsMode()
enable();
}
}
#endif // Exclude GPS
#endif // Exclude GPS