mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-09 06:32:06 +00:00
* 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:
parent
c5f2d2736d
commit
1481ce987e
@ -400,9 +400,16 @@ bool GPS::setup()
|
|||||||
int msglen = 0;
|
int msglen = 0;
|
||||||
|
|
||||||
if (!didSerialInit) {
|
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 (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) {
|
||||||
|
|
||||||
// if GPS_BAUDRATE is specified in variant (i.e. not 9600), skip to the specified rate.
|
// if GPS_BAUDRATE is specified in variant (i.e. not 9600), skip to the specified rate.
|
||||||
if (speedSelect == 0 && GPS_BAUDRATE != serialSpeeds[speedSelect]) {
|
if (speedSelect == 0 && GPS_BAUDRATE != serialSpeeds[speedSelect]) {
|
||||||
speedSelect = std::find(serialSpeeds, std::end(serialSpeeds), GPS_BAUDRATE) - serialSpeeds;
|
speedSelect = std::find(serialSpeeds, std::end(serialSpeeds), GPS_BAUDRATE) - serialSpeeds;
|
||||||
@ -423,6 +430,9 @@ bool GPS::setup()
|
|||||||
} else {
|
} else {
|
||||||
gnssModel = GNSS_MODEL_UNKNOWN;
|
gnssModel = GNSS_MODEL_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
gnssModel = GNSS_MODEL_UC6580;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (gnssModel == GNSS_MODEL_MTK) {
|
if (gnssModel == GNSS_MODEL_MTK) {
|
||||||
/*
|
/*
|
||||||
@ -774,6 +784,7 @@ bool GPS::setup()
|
|||||||
LOG_INFO("GNSS module configuration saved!\n");
|
LOG_INFO("GNSS module configuration saved!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
didSerialInit = true;
|
didSerialInit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1789,4 +1800,4 @@ void GPS::toggleGpsMode()
|
|||||||
enable();
|
enable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // Exclude GPS
|
#endif // Exclude GPS
|
||||||
|
Loading…
Reference in New Issue
Block a user