From 2596f0f11b4c9d5da4cc982d673e2ce25f2d86c1 Mon Sep 17 00:00:00 2001 From: Martin Boissonneault <19229816+Ve2mrx@users.noreply.github.com> Date: Sat, 14 Nov 2026 17:42:51 -0500 Subject: [PATCH] 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 ` 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 --- src/helpers/sensors/RakLocationProvider.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/helpers/sensors/RakLocationProvider.h b/src/helpers/sensors/RakLocationProvider.h index 2dda12a512..f395530f29 100644 --- a/src/helpers/sensors/RakLocationProvider.h +++ b/src/helpers/sensors/RakLocationProvider.h @@ -211,6 +211,20 @@ class RakLocationProvider : public LocationProvider { 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(); }