Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4a515b1

Browse files
committedMay 17, 2022
feat(battery): Add Kconfig setting for battery level report interval
1 parent 54747a5 commit 4a515b1

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
 

‎app/Kconfig

+5
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,11 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE
518518
#SETTINGS
519519
endif
520520

521+
config ZMK_BATTERY_REPORT_INTERVAL
522+
depends on ZMK_BLE
523+
int "Battery level report interval in seconds"
524+
default 60
525+
521526
#Advanced
522527
endmenu
523528

‎app/src/battery.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static int zmk_battery_init(const struct device *_arg) {
104104
return rc;
105105
}
106106

107-
k_timer_start(&battery_timer, K_MINUTES(1), K_MINUTES(1));
107+
k_timer_start(&battery_timer, K_MINUTES(1), K_SECONDS(CONFIG_ZMK_BATTERY_REPORT_INTERVAL));
108108

109109
return 0;
110110
}

0 commit comments

Comments
 (0)
Please sign in to comment.