Skip to content

Commit

Permalink
fix(soft_off): central waits 100ms in split if hold_time enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanG committed May 13, 2024
1 parent f0b20c1 commit 2ee76be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/behaviors/behavior_soft_off.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ static int on_keymap_binding_released(struct zmk_behavior_binding *binding,
uint32_t hold_time = k_uptime_get() - data->press_start;

if (hold_time > config->hold_time_ms) {
if (IS_ENABLED(CONFIG_ZMK_SPLIT) && IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL)) {
k_sleep(K_MSEC(100));
}
zmk_pm_soft_off();
} else {
LOG_INF("Not triggering soft off: held for %d and hold time is %d", hold_time,
Expand Down

0 comments on commit 2ee76be

Please sign in to comment.