diff --git a/include/power_utils.h b/include/power_utils.h index b176f91..f0e37e8 100644 --- a/include/power_utils.h +++ b/include/power_utils.h @@ -41,7 +41,6 @@ namespace POWER_Utils { double getBatteryVoltage(); bool isBatteryConnected(); - void activateMeasurement(); void activateGPS(); void deactivateGPS(); void activateLoRa(); diff --git a/src/LoRa_APRS_iGate.cpp b/src/LoRa_APRS_iGate.cpp index 7a24794..94a2a2c 100644 --- a/src/LoRa_APRS_iGate.cpp +++ b/src/LoRa_APRS_iGate.cpp @@ -66,7 +66,7 @@ ___________________________________________________________________*/ #endif -String versionDate = "2025-08-20"; +String versionDate = "2025-08-26"; Configuration Config; WiFiClient espClient; #ifdef HAS_GPS diff --git a/src/power_utils.cpp b/src/power_utils.cpp index 485b321..c13f537 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -88,6 +88,16 @@ namespace POWER_Utils { } #endif + #if defined(HAS_AXP192) || defined(HAS_AXP2101) + void activateMeasurement() { + PMU.disableTSPinMeasure(); + PMU.enableBattDetection(); + PMU.enableVbusVoltageMeasure(); + PMU.enableBattVoltageMeasure(); + PMU.enableSystemVoltageMeasure(); + } + #endif + double getBatteryVoltage() { #if defined(HAS_AXP192) || defined(HAS_AXP2101) return (PMU.getBattVoltage() / 1000.0); @@ -102,17 +112,7 @@ namespace POWER_Utils { #else return false; #endif - } - - void activateMeasurement() { - #if defined(HAS_AXP192) || defined(HAS_AXP2101) - PMU.disableTSPinMeasure(); - PMU.enableBattDetection(); - PMU.enableVbusVoltageMeasure(); - PMU.enableBattVoltageMeasure(); - PMU.enableSystemVoltageMeasure(); - #endif - } + } void activateGPS() { #ifdef HAS_AXP192