From 9314bf10ba0002c2d54ec186bab84eb810f7d404 Mon Sep 17 00:00:00 2001 From: Ricardo Guzman Date: Wed, 7 Oct 2026 15:09:16 -0300 Subject: [PATCH] VEXT fix for Heltec Wireless Tracker --- src/power_utils.cpp | 10 +++------- src/utils.cpp | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/power_utils.cpp b/src/power_utils.cpp index c65361c..907253d 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -66,7 +66,7 @@ namespace POWER_Utils { } void vext_ctrl_OFF() { - digitalWrite(VEXT_CTRL_PIN, Config.digi.ecoMode == 1 ? VEXT_CTRL_ON_STATE : !VEXT_CTRL_ON_STATE); + digitalWrite(VEXT_CTRL_PIN, !VEXT_CTRL_ON_STATE); // always off, regardless of ecoMode } #endif @@ -111,9 +111,7 @@ namespace POWER_Utils { PMU.enableALDO3(); #endif #endif - #ifdef HELTEC_WIRELESS_TRACKER - adc_ctrl_ON(); - #endif + // HELTEC_WIRELESS_TRACKER: GPS shares Vext (GPIO3) with the TFT, so it follows the display power (not controlled here) //gpsIsActive = true; } @@ -129,9 +127,7 @@ namespace POWER_Utils { PMU.disableALDO3(); #endif #endif - #ifdef HELTEC_WIRELESS_TRACKER - adc_ctrl_OFF(); - #endif + // HELTEC_WIRELESS_TRACKER: GPS shares Vext with the TFT, turned off with it (see activateGPS) //gpsIsActive = false; } diff --git a/src/utils.cpp b/src/utils.cpp index f3b21cd..c59c887 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -433,7 +433,7 @@ namespace Utils { displayToggle(false); } #ifdef VEXT_CTRL_PIN - digitalWrite(VEXT_CTRL_PIN, !VEXT_CTRL_ON_STATE); // VEXT off before deep sleep (always, regardless of ecoMode) + POWER_Utils::vext_ctrl_OFF(); // VEXT off before deep sleep (always, regardless of ecoMode) #endif LoRa_Utils::sleepRadio(); POWER_Utils::deactivateGPS(); // GPS rail off (AXP boards), otherwise it keeps draining the low battery while sleeping