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.
This commit is contained in:
Tim Crawford 2021-05-14 10:41:01 -06:00 committed by Jeremy Soller
parent 76e02c9514
commit 532219c3f8

View File

@ -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