From 99f9031244101e822162a1690cbbad850510defb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADnez?= <58857054+elpekenin@users.noreply.github.com> Date: Sun, 17 Mar 2024 09:48:41 +0100 Subject: [PATCH] Update app/src/activity.c Fix logic for peripheral side Co-authored-by: Justin Ridgewell --- app/src/activity.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/activity.c b/app/src/activity.c index 7c9ab04d..e4420f48 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -135,7 +135,11 @@ void activity_work_handler(struct k_work *work) { #if IS_ENABLED(CONFIG_ZMK_AWAKE_WHILE_BLE_CONNECTED) // if user inactive and no USB // keyboard will sleep as soon as BLE is disconnected +#if !IS_ENABLED(CONFIG_ZMK_SPLIT) || IS_ENABLED(CONFIG_ZMK_SPLIT_ROLE_CENTRAL) && !zmk_ble_active_profile_is_connected() +#else + && !zmk_split_bt_peripheral_is_connected() +#endif #endif ) { // Put devices in suspend power mode before sleeping