fix(soft_off): central waits 100ms in split if hold_time enabled

This commit is contained in:
GermanG 2024-05-12 08:22:11 +02:00
parent 4dfc45d4ab
commit 3a28474bc1

View file

@ -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_ROLE_CENTRAL)) {
k_usleep(100000);
}
zmk_pm_soft_off();
} else {
LOG_INF("Not triggering soft off: held for %d and hold time is %d", hold_time,