bugfix battery level status display IP5306
This commit is contained in:
parent
2624f7b35b
commit
904394a200
@ -303,13 +303,11 @@ uint8_t IP5306_GetBatteryLevel(void) {
|
||||
void printIP5306Stats(void) {
|
||||
bool usb = IP5306_GetPowerSource();
|
||||
bool full = IP5306_GetBatteryFull();
|
||||
uint8_t leds = IP5306_GetBatteryLevel();
|
||||
uint8_t level = IP5306_GetBatteryLevel();
|
||||
ESP_LOGI(TAG,
|
||||
"IP5306: Power Source: %s, Battery State: %s, Battery "
|
||||
"Level: %u%%",
|
||||
"IP5306: Power Source: %s, Battery State: %s, Battery Level: %u%%",
|
||||
usb ? "USB" : "BATTERY",
|
||||
full ? "CHARGED" : (usb ? "CHARGING" : "DISCHARGING"),
|
||||
IP5306_LEDS2PCT(leds));
|
||||
full ? "CHARGED" : (usb ? "CHARGING" : "DISCHARGING"), level);
|
||||
}
|
||||
|
||||
#endif // HAS_IP5306
|
Loading…
Reference in New Issue
Block a user