feat(sleep): Option to enter deep sleep after ble connection severed #2669
+47
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce a new Kconfig flag to enable enter SLEEP mode on device if BT connection severed from main active profile, added with some logic changes to enable this modality. This addresses issue #2198
🔝 main device logs
🔝 peripheral logs
Currently the feature testing done as such:
Set to Kconfig flags in my config
CONFIG_ZMK_SLEEP_ON_BLE_DISCONNECT=y
CONFIG_ZMK_SLEEP_DISCONNECT_TIMER=10000
Built using the following west commands:
west build -p -d build/right -b nice_nano_v2 -S zmk-usb-logging -- -DSHIELD=corne_right
west build -p -d build/left -b nice_nano_v2 -S zmk-usb-logging -- -DSHIELD=corne_left
Connected to the central split and tested by disconnecting Bluetooth to the active device the split keyboard is connected to, logs attached above.
Connected to the peripheral split and tested it by disconnecting Bluetooth to the active device which led to the main device entering sleep, and subsequently after losing connection to the active device, the peripheral device automatically entered sleep.
Haven't done testing on non-split keyboard as I do not have access to such systems.
PR check-list