From 532219c3f84907c29a92f3bac6a7968b57246dee Mon Sep 17 00:00:00 2001 From: Tim Crawford Date: Fri, 14 May 2021 10:41:01 -0600 Subject: [PATCH] Allow battery thresholds to be set in config.mk The start/end thresholds are user-configurable values. This will allow us to override these with profile values if desired. --- src/board/system76/common/common.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/board/system76/common/common.mk b/src/board/system76/common/common.mk index 427b3a946..eb3ea6826 100644 --- a/src/board/system76/common/common.mk +++ b/src/board/system76/common/common.mk @@ -25,9 +25,12 @@ INCLUDE+=$(wildcard $(SYSTEM76_COMMON_DIR)/include/common/*.h) $(SYSTEM76_COMMON CFLAGS+=-I$(SYSTEM76_COMMON_DIR)/include # Set battery charging thresholds +BATTERY_START_THRESHOLD?=0 +BATTERY_END_THRESHOLD?=100 + CFLAGS+=\ - -DBATTERY_START_THRESHOLD=0 \ - -DBATTERY_END_THRESHOLD=100 + -DBATTERY_START_THRESHOLD=$(BATTERY_START_THRESHOLD) \ + -DBATTERY_END_THRESHOLD=$(BATTERY_END_THRESHOLD) # Add charger CHARGER?=bq24780s