Skip to content

Commit

Permalink
Cleanup for Air530z GPS (#4344)
Browse files Browse the repository at this point in the history
It turns out that the Air530z is a GNSS_MODEL_MTK. Our existing
code detects and configures it properly. This patch removes a
couple of AIROHA ifdefs since they are not required for a
working GPS.

Co-authored-by: Ben Meadors <[email protected]>
  • Loading branch information
fifieldt and thebentern authored Jul 31, 2024
1 parent 29fe6e7 commit ce1eb14
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/gps/GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,6 @@ 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) {
Expand Down Expand Up @@ -784,7 +778,6 @@ bool GPS::setup()
LOG_INFO("GNSS module configuration saved!\n");
}
}
#endif
didSerialInit = true;
}

Expand Down Expand Up @@ -1191,10 +1184,6 @@ GnssModel_t GPS::probe(int serialSpeed)
_serial_gps->updateBaudRate(serialSpeed);
}
#endif
#ifdef GNSS_AIROHA

return GNSS_MODEL_UNKNOWN;
#else
#ifdef GPS_DEBUG
for (int i = 0; i < 20; i++) {
getACK("$GP", 200);
Expand Down Expand Up @@ -1359,7 +1348,6 @@ GnssModel_t GPS::probe(int serialSpeed)
}

return GNSS_MODEL_UBLOX;
#endif // !GNSS_Airoha
}

GPS *GPS::createGps()
Expand Down Expand Up @@ -1809,4 +1797,4 @@ void GPS::toggleGpsMode()
enable();
}
}
#endif // Exclude GPS
#endif // Exclude GPS

0 comments on commit ce1eb14

Please sign in to comment.