refactor(sensors): Sensor event channel data, resolution tweaks.

* Refactor sensor events to include channel data,
  necessary for prop split encoders, and avoiding duplicate calls,
  to fetch channel data twice, etc.
* More consistent behavior driver API.
* Allow setting triggers per resolution at the behavior level optionally.
This commit is contained in:
Peter Johanson
2021-09-01 03:49:18 +00:00
committed by Pete Johanson
parent dcf5e75fa6
commit 2244bd3d81
12 changed files with 258 additions and 83 deletions

View File

@@ -194,6 +194,18 @@ rsource "src/split/Kconfig"
#Basic Keyboard Setup
endmenu
menu "Encoders"
config ZMK_ENCODERS_DEFAULT_TRIGGERS_PER_ROTATION
int "Default behavior triggers per rotation"
help
Unless overridden for a specific behavior in the keymap/devicetree, this value
determines how many times to trigger the bound behavior per full rotation.
For tactile encoders with detents, this usually should match the number of
detents per rotation of the encoder.
default 30
endmenu
menu "Display/LED Options"
rsource "src/display/Kconfig"
@@ -523,6 +535,14 @@ config ZMK_WPM
config SENSOR
default y
if ZMK_KEYMAP_SENSORS
config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
int "Default triggers per rotation"
default 20
endif # ZMK_KEYMAP_SENSORS
choice CBPRINTF_IMPLEMENTATION
default CBPRINTF_NANO