monitorMod1

This commit is contained in:
richonguzman 2025-08-26 17:44:04 -04:00
parent 83a39c2093
commit 4651938cb1
3 changed files with 12 additions and 13 deletions

View file

@ -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