From e3ee1908ddf99711b65b46fdab0c7b4ddca7867d Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Mon, 29 Nov 2021 20:59:05 +0000 Subject: powermgmt: Small cleanups to battery capacity code - Don't include the 'battery capacity' setting unless the target allows changing it. - Clean up the preprocessor conditionals used to check for variable battery capacity support. - Don't use a variable for battery capacity unless it is actually needed. Change-Id: I3d8a338f107014f2c5098bc0a44ef0cfb4df9356 --- apps/settings.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'apps/settings.h') diff --git a/apps/settings.h b/apps/settings.h index c0a913c1c6..ce7421d95e 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -608,10 +608,9 @@ struct user_settings /* power settings */ int poweroff; /* idle power off timer */ -#if BATTERY_CAPACITY_DEFAULT > 0 +#if BATTERY_CAPACITY_INC > 0 int battery_capacity; /* in mAh */ #endif - #if BATTERY_TYPES_COUNT > 1 int battery_type; /* for units which can take multiple types (Ondio). */ #endif -- cgit v1.2.3