fix(sensors): Only accept data once per behavior.

* Don't accept data for the same behavior on multiple layers more than
  once, to avoid duplicate/extraneous triggers.
This commit is contained in:
Peter Johanson
2023-06-28 19:26:33 +00:00
committed by Pete Johanson
parent dcb1f8f135
commit a92a4967aa
4 changed files with 15 additions and 13 deletions

View File

@@ -8,6 +8,10 @@
#include <zmk/events/position_state_changed.h>
#define ZMK_LAYER_CHILD_LEN_PLUS_ONE(node) 1 +
#define ZMK_KEYMAP_LAYERS_LEN \
(DT_FOREACH_CHILD(DT_INST(0, zmk_keymap), ZMK_LAYER_CHILD_LEN_PLUS_ONE) 0)
typedef uint32_t zmk_keymap_layers_state_t;
uint8_t zmk_keymap_layer_default();