From 923f92cb12ee39364ddec340de140d126ced1347 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 23 Dec 2021 11:37:15 +0000 Subject: [PATCH] Fix yellow from 4506f2b58d Change-Id: I60bb56830ef5ba0fcde4564cdafef594af400c70 --- firmware/powermgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {