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

@@ -14,6 +14,11 @@
*/
#define ZMK_VIRTUAL_KEY_POSITION_SENSOR(index) (ZMK_KEYMAP_LEN + (index))
/**
* Gets the sensor number from the virtual key position.
*/
#define ZMK_SENSOR_POSITION_FROM_VIRTUAL_KEY_POSITION(vkp) ((vkp)-ZMK_KEYMAP_LEN)
/**
* Gets the virtual key position to use for the combo with the given index.
*/