battery on Screen fix for axp2101
This commit is contained in:
parent
ef6eb5bd29
commit
4825385d2f
|
|
@ -47,7 +47,7 @@ TinyGPSPlus gps;
|
|||
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||
#endif
|
||||
|
||||
String versionDate = "2024.09.18";
|
||||
String versionDate = "2024.09.19";
|
||||
|
||||
uint8_t myBeaconsIndex = 0;
|
||||
int myBeaconsSize = Config.beacons.size();
|
||||
|
|
|
|||
|
|
@ -160,15 +160,10 @@ namespace POWER_Utils {
|
|||
|
||||
void obtainBatteryInfo() {
|
||||
static unsigned int rate_limit_check_battery = 0;
|
||||
if (!(rate_limit_check_battery++ % 60))
|
||||
BatteryIsConnected = isBatteryConnected();
|
||||
if (!(rate_limit_check_battery++ % 60)) BatteryIsConnected = isBatteryConnected();
|
||||
if (BatteryIsConnected) {
|
||||
#ifdef HAS_AXP2101
|
||||
batteryVoltage = String(PMU.getBattVoltage()/1000);
|
||||
#else
|
||||
batteryVoltage = String(getBatteryVoltage(), 2);
|
||||
#endif
|
||||
batteryChargeDischargeCurrent = String(getBatteryChargeDischargeCurrent(), 0);
|
||||
batteryVoltage = String(getBatteryVoltage(), 2);
|
||||
batteryChargeDischargeCurrent = String(getBatteryChargeDischargeCurrent(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue