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);
|
OneButton userButton = OneButton(BUTTON_PIN, true, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
String versionDate = "2024.09.18";
|
String versionDate = "2024.09.19";
|
||||||
|
|
||||||
uint8_t myBeaconsIndex = 0;
|
uint8_t myBeaconsIndex = 0;
|
||||||
int myBeaconsSize = Config.beacons.size();
|
int myBeaconsSize = Config.beacons.size();
|
||||||
|
|
|
||||||
|
|
@ -160,15 +160,10 @@ namespace POWER_Utils {
|
||||||
|
|
||||||
void obtainBatteryInfo() {
|
void obtainBatteryInfo() {
|
||||||
static unsigned int rate_limit_check_battery = 0;
|
static unsigned int rate_limit_check_battery = 0;
|
||||||
if (!(rate_limit_check_battery++ % 60))
|
if (!(rate_limit_check_battery++ % 60)) BatteryIsConnected = isBatteryConnected();
|
||||||
BatteryIsConnected = isBatteryConnected();
|
|
||||||
if (BatteryIsConnected) {
|
if (BatteryIsConnected) {
|
||||||
#ifdef HAS_AXP2101
|
batteryVoltage = String(getBatteryVoltage(), 2);
|
||||||
batteryVoltage = String(PMU.getBattVoltage()/1000);
|
batteryChargeDischargeCurrent = String(getBatteryChargeDischargeCurrent(), 0);
|
||||||
#else
|
|
||||||
batteryVoltage = String(getBatteryVoltage(), 2);
|
|
||||||
#endif
|
|
||||||
batteryChargeDischargeCurrent = String(getBatteryChargeDischargeCurrent(), 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue