forked from kofal.net/zmk
test(split): Test split HID indicator setting. (#2747)
Add integration test for HID indicator state being propagated to split peripherals.
This commit is contained in:
1
app/tests/ble/split/set-hid-indicators/events.patterns
Normal file
1
app/tests/ble/split/set-hid-indicators/events.patterns
Normal file
@@ -0,0 +1 @@
|
||||
s/^d_03: @[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9][0-9] .{19}/peripheral 0 /p
|
||||
3
app/tests/ble/split/set-hid-indicators/nrf52_bsim.conf
Normal file
3
app/tests/ble/split/set-hid-indicators/nrf52_bsim.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
CONFIG_ZMK_SPLIT=y
|
||||
CONFIG_ZMK_HID_INDICATORS=y
|
||||
CONFIG_ZMK_SPLIT_PERIPHERAL_HID_INDICATORS=y
|
||||
19
app/tests/ble/split/set-hid-indicators/nrf52_bsim.keymap
Normal file
19
app/tests/ble/split/set-hid-indicators/nrf52_bsim.keymap
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
&kscan {
|
||||
/delete-property/ exit-after;
|
||||
events = <>;
|
||||
};
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&kp A &kp B
|
||||
&kp C &kp D>;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
#include <dt-bindings/zmk/kscan_mock.h>
|
||||
|
||||
|
||||
&kscan {
|
||||
/delete-property/ exit-after;
|
||||
events = <>;
|
||||
};
|
||||
2
app/tests/ble/split/set-hid-indicators/siblings.txt
Normal file
2
app/tests/ble/split/set-hid-indicators/siblings.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
./ble_test_central.exe -d=2 -wait_on_start=1300 -write_hid_indicators_on_discovery
|
||||
./tests_ble_split_set-hid-indicators_peripheral.exe -d=3
|
||||
13
app/tests/ble/split/set-hid-indicators/snapshot.log
Normal file
13
app/tests/ble/split/set-hid-indicators/snapshot.log
Normal file
@@ -0,0 +1,13 @@
|
||||
peripheral 0 OS build 702e50c58f67 ***
|
||||
peripheral 0 <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
|
||||
peripheral 0 <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
|
||||
peripheral 0 <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 3.5 Build 0
|
||||
peripheral 0 <wrn> bt_id: No static addresses stored in controller
|
||||
peripheral 0 <inf> bt_hci_core: Identity: D1:0B:03:A3:ED:6F (random)
|
||||
peripheral 0 <inf> bt_hci_core: HCI: version 5.4 (0x0d) revision 0x0000, manufacturer 0x05f1
|
||||
peripheral 0 <inf> bt_hci_core: LMP: version 5.4 (0x0d) subver 0xffff
|
||||
peripheral 0 <inf> zmk: Welcome to ZMK!
|
||||
peripheral 0 <dbg> zmk: security_changed: Security changed: FD:9E:B2:48:47:39 (random) level 2
|
||||
peripheral 0 <dbg> zmk: split_svc_pos_state_ccc: value 1
|
||||
peripheral 0 <dbg> zmk: split_svc_select_phys_layout_callback: Selecting physical layout after GATT write of 0
|
||||
peripheral 0 <dbg> zmk: split_svc_update_indicators_callback: Raising HID indicators changed event: 7
|
||||
Reference in New Issue
Block a user