Skip to content

Commit

Permalink
feat(sensors): Make sensors always trigger on central (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
caksoylar authored and petejohanson committed Sep 23, 2024
1 parent 4fdfb01 commit b249135
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/behaviors/behavior_sensor_rotate_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b249135

Please sign in to comment.