fix(bt): Fix BT tests after soft off work.

* Move to explicit enable of `ZMK_PM_SOFT_OFF` to turn
  on the feature and use the behaviors, which matches
  how other features work, and helps with split and
  testing schemes.
This commit is contained in:
Peter Johanson 2023-12-07 04:04:13 +00:00 committed by Pete Johanson
parent 0d4d4fb2b5
commit e78249ee06
4 changed files with 16 additions and 3 deletions

View File

@ -25,8 +25,7 @@ config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
config ZMK_BEHAVIOR_SOFT_OFF config ZMK_BEHAVIOR_SOFT_OFF
bool bool
default y default y
select ZMK_PM_SOFT_OFF depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED && ZMK_PM_SOFT_OFF
depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
bool bool

View File

@ -0,0 +1 @@
CONFIG_ZMK_PM_SOFT_OFF=y

View File

@ -6,8 +6,9 @@
/ { / {
behaviors { behaviors {
soft_off: soft_off { /omit-if-no-ref/ soft_off: soft_off {
compatible = "zmk,behavior-soft-off"; compatible = "zmk,behavior-soft-off";
label = "SOFTOFF";
#binding-cells = <0>; #binding-cells = <0>;
}; };
}; };

View File

@ -24,6 +24,18 @@ Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/
| `CONFIG_ZMK_SLEEP` | bool | Enable deep sleep support | n | | `CONFIG_ZMK_SLEEP` | bool | Enable deep sleep support | n |
| `CONFIG_ZMK_IDLE_SLEEP_TIMEOUT` | int | Milliseconds of inactivity before entering deep sleep | 900000 | | `CONFIG_ZMK_IDLE_SLEEP_TIMEOUT` | int | Milliseconds of inactivity before entering deep sleep | 900000 |
## Soft Off
The [soft off feature](../features/soft-off.md) allows turning the keyboard on/off from either dedicated hardware of using the [`&soft_off` behavior](../behaviors/soft-off.md) to turn off and a reset button to turn back on again.
### Kconfig
Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig)
| Config | Type | Description | Default |
| ------------------------ | ---- | ------------------------------------------------------------------- | ------- |
| `CONFIG_ZMK_PM_SOFT_OFF` | bool | Enable soft off functionality from the keymap of dedicated hardware | n |
## External Power Control ## External Power Control
Driver for enabling or disabling power to peripherals such as displays and lighting. This driver must be configured to use [power management behaviors](../behaviors/power.md). Driver for enabling or disabling power to peripherals such as displays and lighting. This driver must be configured to use [power management behaviors](../behaviors/power.md).