fix: Disable battery sensors if reporting is off

This commit is contained in:
Cem Aksoylar 2023-07-14 10:57:28 -07:00
parent bbb27ac027
commit afa6d65636
2 changed files with 4 additions and 3 deletions

View file

@ -500,7 +500,7 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE
endif endif
config ZMK_BATTERY_REPORT_INTERVAL config ZMK_BATTERY_REPORT_INTERVAL
depends on ZMK_BLE depends on ZMK_BATTERY_REPORTING
int "Battery level report interval in seconds" int "Battery level report interval in seconds"
default 60 default 60

View file

@ -6,6 +6,7 @@ DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER := zmk,battery-voltage-divider
config ZMK_BATTERY config ZMK_BATTERY
bool "ZMK battery monitoring" bool "ZMK battery monitoring"
depends on ZMK_BATTERY_REPORTING
help help
Enable battery monitoring Enable battery monitoring
@ -13,7 +14,7 @@ config ZMK_BATTERY_NRF_VDDH
bool bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_NRF_VDDH)) default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_NRF_VDDH))
select ADC select ADC
select ZMK_BATTERY imply ZMK_BATTERY
help help
Enable ZMK nRF VDDH voltage driver for battery monitoring. Enable ZMK nRF VDDH voltage driver for battery monitoring.
@ -21,6 +22,6 @@ config ZMK_BATTERY_VOLTAGE_DIVIDER
bool bool
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER)) default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BATTERY_VOLTAGE_DIVIDER))
select ADC select ADC
select ZMK_BATTERY imply ZMK_BATTERY
help help
Enable ZMK battery voltage divider driver for battery monitoring. Enable ZMK battery voltage divider driver for battery monitoring.