fix(battery): detect TP4056 charging and full states on new board
This commit is contained in:
+14
-24
@@ -278,9 +278,9 @@ menu "TQ Cat Configuration"
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_CHARGE_GPIO
|
||||
int "TP4056 charge status GPIO (-1 to disable)"
|
||||
int "TP4056 charge status GPIO"
|
||||
default 18
|
||||
range -1 48
|
||||
range 0 48
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_CHARGE_ACTIVE_LEVEL
|
||||
@@ -289,6 +289,18 @@ menu "TQ Cat Configuration"
|
||||
range 0 1
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_FULL_GPIO
|
||||
int "TP4056 full status GPIO"
|
||||
default 8
|
||||
range 0 48
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_FULL_ACTIVE_LEVEL
|
||||
int "TP4056 full active level"
|
||||
default 0
|
||||
range 0 1
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_SHUTDOWN_WAKE_BUTTON_GPIO
|
||||
int "Optional active-low deep-sleep wake button GPIO (-1 to disable)"
|
||||
default -1
|
||||
@@ -1053,28 +1065,6 @@ menu "TQ Cat Configuration"
|
||||
bool "Enable battery monitoring"
|
||||
default y
|
||||
|
||||
config TQ_BATTERY_FULL_MIN_VOLTAGE_MV
|
||||
int "Minimum voltage for charge-complete prompt (mV)"
|
||||
default 4150
|
||||
range 4000 4200
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
help
|
||||
The charging-status input alone cannot distinguish charge termination
|
||||
from charger removal. Require at least this filtered battery
|
||||
voltage before inferring that charging has completed.
|
||||
|
||||
config TQ_BATTERY_FULL_MIN_PERCENT
|
||||
int "Minimum level for charge-complete prompt (percent)"
|
||||
default 95
|
||||
range 90 100
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_FULL_CONFIRM_SEC
|
||||
int "Charge-complete stable confirmation time (seconds)"
|
||||
default 30
|
||||
range 5 300
|
||||
depends on TQ_BATTERY_ENABLE
|
||||
|
||||
config TQ_BATTERY_DIVIDER_HIGH_OHM
|
||||
int "Battery divider resistance from VBAT to ADC (ohm)"
|
||||
default 100000
|
||||
|
||||
Reference in New Issue
Block a user