Fix GPS +8mA power leak when disabled (nRF52)

On the T114, GPS_RESET (pin 38) is the same pin as PIN_3V3_EN.
MicroNMEALocationProvider::begin() sets pin 38 HIGH (powering the 3V3
rail) but stop() never set it back LOW, leaving the GPS module powered
even when disabled.

Assert reset pin in stop() to mirror begin(), and guard
_location->loop() behind gps_active check.

Fixes meshcore-dev/MeshCore#1628
このコミットが含まれているのは:
Wessel Nieboer
2026-02-28 19:13:42 +01:00
committed by Wessel Nieboer
コミット 8a9a0dca5f
2個のファイルの変更7行の追加2行の削除
+3 -1
ファイルの表示
@@ -707,7 +707,9 @@ void EnvironmentSensorManager::loop() {
static long next_gps_update = 0;
#if ENV_INCLUDE_GPS
_location->loop();
if (gps_active) {
_location->loop();
}
if (millis() > next_gps_update) {
if(gps_active){
+3
ファイルの表示
@@ -79,6 +79,9 @@ public :
if (_pin_en != -1) {
digitalWrite(_pin_en, !PIN_GPS_EN_ACTIVE);
}
if (_pin_reset != -1) {
digitalWrite(_pin_reset, GPS_RESET_FORCE);
}
if (_peripher_power) _peripher_power->release();
}