rak4631: forward the first-fix limit and gps diag to the serial GPS
RakLocationProvider wraps a MicroNMEALocationProvider but did not override setFirstFixTimeout(), getFirstFixTimeout() or formatDiagnostics(), so on RAK4631 boards with a serial GPS: - `gps firstfix` always answered "0 (no limit)" (the LocationProvider default), while the limit in force was the build default (1 h); - `gps firstfix <n>` saved the value but never applied it, at once or at boot; - `gps diag` gave the short base form, without the UART/NMEA counters or fm:. Forward all three to the NMEA provider. The RAK12500 (I2C) path has no first-fix limit, so it keeps reporting 0 and the short diagnostics. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
166863f690
commit
3a3f69fb5d
1 file changed
+14
@@ -211,6 +211,20 @@ public:
|
||||
return _gpsPeriodSeconds;
|
||||
}
|
||||
|
||||
// the first-fix limit is only implemented on the serial NMEA path
|
||||
void setFirstFixTimeout(uint32_t seconds) override {
|
||||
_nmea.setFirstFixTimeout(seconds);
|
||||
}
|
||||
|
||||
uint32_t getFirstFixTimeout() const override {
|
||||
return _useI2c ? 0 : _nmea.getFirstFixTimeout();
|
||||
}
|
||||
|
||||
void formatDiagnostics(char* out, size_t out_size) override {
|
||||
if (_useI2c) LocationProvider::formatDiagnostics(out, out_size);
|
||||
else _nmea.formatDiagnostics(out, out_size);
|
||||
}
|
||||
|
||||
bool isGpsOn() const override {
|
||||
return _useI2c ? _gpsOn : _nmea.isGpsOn();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user