Testing: split input test (#2762)

test(pointing): Add mock input device.

New mock input device to generate input events for tests.

test(split): Add peripheral input test.

Test event propagation from peripheral input devices.

fix(split): Proper scoping for local within switch.

Minor compile fix.

chore: Fix up test snapshots after logging changes.

Adjust the test snapshots after logging changes to the central.

fix(kscan): Don't fire last mock event twice.

Fix a bug where the kscan mock would raise the last mock event
twice before halting processing.
This commit is contained in:
Pete Johanson
2025-01-13 13:15:16 -07:00
committed by GitHub
parent 022603ec16
commit 8dddb1d9d7
25 changed files with 332 additions and 21 deletions

View File

@@ -582,7 +582,7 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn,
LOG_DBG("[ATTRIBUTE] handle %u", attr->handle);
switch (params->type) {
case BT_GATT_DISCOVER_CHARACTERISTIC:
case BT_GATT_DISCOVER_CHARACTERISTIC: {
const struct bt_uuid *chrc_uuid = ((struct bt_gatt_chrc *)attr->user_data)->uuid;
if (bt_uuid_cmp(chrc_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_POSITION_STATE_UUID)) ==
@@ -665,6 +665,7 @@ static uint8_t split_central_chrc_discovery_func(struct bt_conn *conn,
#endif /* IS_ENABLED(CONFIG_ZMK_SPLIT_BLE_CENTRAL_BATTERY_LEVEL_FETCHING) */
}
break;
}
case BT_GATT_DISCOVER_STD_CHAR_DESC:
#if IS_ENABLED(CONFIG_ZMK_INPUT_SPLIT)
if (bt_uuid_cmp(slot->discover_params.uuid, BT_UUID_GATT_CCC) == 0) {