Skip to content

Commit

Permalink
Allow battery thresholds to be set in config.mk
Browse files Browse the repository at this point in the history
The start/end thresholds are user-configurable values. This will allow
us to override these with profile values if desired.
  • Loading branch information
crawfxrd authored and jackpot51 committed May 14, 2021
1 parent 76e02c9 commit 532219c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/board/system76/common/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 532219c

Please sign in to comment.