aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/behaviors
diff options
context:
space:
mode:
authorCem Aksoylar <[email protected]>2024-08-09 11:27:36 -0700
committerPete Johanson <[email protected]>2024-09-23 10:17:29 -0600
commitb249135742ebba10c07fa899b50cbb260c155a45 (patch)
tree61bbba991986ab0166162caec8807a57163f9063 /app/src/behaviors
parent4fdfb01b6aa3715ae9e28391991f8bb1b604db4d (diff)
downloadzmk-b249135742ebba10c07fa899b50cbb260c155a45.tar.gz
zmk-b249135742ebba10c07fa899b50cbb260c155a45.zip
feat(sensors): Make sensors always trigger on central (for now)
Diffstat (limited to 'app/src/behaviors')
-rw-r--r--app/src/behaviors/behavior_sensor_rotate_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/behaviors/behavior_sensor_rotate_common.c b/app/src/behaviors/behavior_sensor_rotate_common.c
index 677443ee29..e8fd7c37a2 100644
--- a/app/src/behaviors/behavior_sensor_rotate_common.c
+++ b/app/src/behaviors/behavior_sensor_rotate_common.c
@@ -6,6 +6,7 @@
#include <zmk/behavior_queue.h>
#include <zmk/virtual_key_position.h>
+#include <zmk/events/position_state_changed.h>
#include "behavior_sensor_rotate_common.h"
@@ -90,8 +91,10 @@ int zmk_behavior_sensor_rotate_common_process(struct zmk_behavior_binding *bindi
LOG_DBG("Sensor binding: %s", binding->behavior_dev);
for (int i = 0; i < triggers; i++) {
- zmk_behavior_queue_add(event.position, event.source, triggered_binding, true, cfg->tap_ms);
- zmk_behavior_queue_add(event.position, event.source, triggered_binding, false, 0);
+ zmk_behavior_queue_add(event.position, ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL,
+ triggered_binding, true, cfg->tap_ms);
+ zmk_behavior_queue_add(event.position, ZMK_POSITION_STATE_CHANGE_SOURCE_LOCAL,
+ triggered_binding, false, 0);
}
return ZMK_BEHAVIOR_OPAQUE;