Correct unused variable warning and typo around GNSS_MODEL_UNKNOWN (#2596)

* Small warning and typo cleanup.

* Update GPS.cpp (missed one instance of GNSS_MODEL_UNKONW)
This commit is contained in:
Max-Plastix 2023-07-08 16:30:52 -07:00 committed by GitHub
parent d8ad2b3f48
commit da389eb787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 7 deletions

View File

@ -212,9 +212,6 @@ bool GPS::setupGPS()
_serial_gps->write("$PCAS11,3*1E\r\n"); _serial_gps->write("$PCAS11,3*1E\r\n");
delay(250); delay(250);
} else if (gnssModel == GNSS_MODEL_UBLOX) { } else if (gnssModel == GNSS_MODEL_UBLOX) {
uint8_t CK_A = 0, CK_B = 0; // checksum bytes
// Configure GNSS system to GPS+SBAS+GLONASS (Module may restart after this command) // Configure GNSS system to GPS+SBAS+GLONASS (Module may restart after this command)
// We need set it because by default it is GPS only, and we want to use GLONASS too // We need set it because by default it is GPS only, and we want to use GLONASS too
// Also we need SBAS for better accuracy and extra features // Also we need SBAS for better accuracy and extra features
@ -752,7 +749,7 @@ GnssModel_t GPS::probe()
// Check that the returned response class and message ID are correct // Check that the returned response class and message ID are correct
if (!getAck(buffer, 256, 0x06, 0x08)) { if (!getAck(buffer, 256, 0x06, 0x08)) {
LOG_WARN("Failed to find UBlox & MTK GNSS Module\n"); LOG_WARN("Failed to find UBlox & MTK GNSS Module\n");
return GNSS_MODEL_UNKONW; return GNSS_MODEL_UNKNOWN;
} }
// Get Ublox gnss module hardware and software info // Get Ublox gnss module hardware and software info
@ -841,4 +838,4 @@ GPS *createGps()
} }
return nullptr; return nullptr;
#endif #endif
} }

View File

@ -14,7 +14,7 @@ struct uBloxGnssModelInfo {
typedef enum { typedef enum {
GNSS_MODEL_MTK, GNSS_MODEL_MTK,
GNSS_MODEL_UBLOX, GNSS_MODEL_UBLOX,
GNSS_MODEL_UNKONW, GNSS_MODEL_UNKNOWN,
} GnssModel_t; } GnssModel_t;
// Generate a string representation of DOP // Generate a string representation of DOP
@ -175,7 +175,7 @@ class GPS : private concurrency::OSThread
uint8_t fixeddelayCtr = 0; uint8_t fixeddelayCtr = 0;
protected: protected:
GnssModel_t gnssModel = GNSS_MODEL_UNKONW; GnssModel_t gnssModel = GNSS_MODEL_UNKNOWN;
}; };
// Creates an instance of the GPS class. // Creates an instance of the GPS class.