diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index 25a9a127e7..8c9b17d52b 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -284,7 +284,8 @@ static void send_battery_level_event(int percent) } } -#if !(CONFIG_BATTERY_MEASURE & PERCENTAGE_MEASURE) +#if !(CONFIG_BATTERY_MEASURE & PERCENTAGE_MEASURE) && \ + (CONFIG_BATTERY_MEASURE & VOLTAGE_MEASURE) /* Look into the percent_to_volt_* table and estimate the battery level. */ static int voltage_to_percent(int voltage, const short* table) {