cosmetic: battery related stuff

This commit is contained in:
Mikkeli Matlock
2026-02-16 14:39:21 +09:00
parent a25e4b2cb3
commit 7165f56464
7 changed files with 40 additions and 7 deletions

View File

@@ -48,3 +48,7 @@ uint8_t Adc_GetBatteryLevel() {
//ESP_LOGW("Battery","Voltage: %.3f V, Level: %.1f %%",vol,level);
return (uint8_t)level;
}
bool Adc_IsCharging() {
return Adc_GetBatteryVoltage() > 4.10f;
}

View File

@@ -4,4 +4,5 @@
void Adc_PortInit();
float Adc_GetBatteryVoltage();
uint8_t Adc_GetBatteryLevel();
uint8_t Adc_GetBatteryLevel();
bool Adc_IsCharging();