From fd65189393a0ed8678859dddad8b8d5506e66a31 Mon Sep 17 00:00:00 2001 From: Manassarn Manoonchai Date: Tue, 3 Jan 2023 23:37:06 +0700 Subject: [PATCH] Fix formatting --- app/include/zmk/split/bluetooth/service.h | 1 - app/src/split/bluetooth/central.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/include/zmk/split/bluetooth/service.h b/app/include/zmk/split/bluetooth/service.h index 9acf120c..b3b3b251 100644 --- a/app/include/zmk/split/bluetooth/service.h +++ b/app/include/zmk/split/bluetooth/service.h @@ -22,7 +22,6 @@ struct zmk_split_run_behavior_payload { char behavior_dev[ZMK_SPLIT_RUN_BEHAVIOR_DEV_LEN]; } __packed; - int zmk_split_bt_position_pressed(uint8_t position); int zmk_split_bt_position_released(uint8_t position); int zmk_split_bt_sensor_triggered(uint8_t sensor_number, struct sensor_value value); diff --git a/app/src/split/bluetooth/central.c b/app/src/split/bluetooth/central.c index b6c8b570..eec5b43f 100644 --- a/app/src/split/bluetooth/central.c +++ b/app/src/split/bluetooth/central.c @@ -379,18 +379,18 @@ static uint8_t split_central_service_discovery_func(struct bt_conn *conn, } #if ZMK_KEYMAP_HAS_SENSORS - memcpy(&sensor_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID), - sizeof(sensor_uuid)); - sensor_discover_params.uuid = &sensor_uuid.uuid; - sensor_discover_params.start_handle = attr->handle; - sensor_discover_params.end_handle = 0xffff; - sensor_discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; - sensor_discover_params.func = split_central_sensor_desc_discovery_func; + memcpy(&sensor_uuid, BT_UUID_DECLARE_128(ZMK_SPLIT_BT_CHAR_SENSOR_STATE_UUID), + sizeof(sensor_uuid)); + sensor_discover_params.uuid = &sensor_uuid.uuid; + sensor_discover_params.start_handle = attr->handle; + sensor_discover_params.end_handle = 0xffff; + sensor_discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; + sensor_discover_params.func = split_central_sensor_desc_discovery_func; - err = bt_gatt_discover(conn, &sensor_discover_params); - if (err) { - LOG_ERR("Discover failed (err %d)", err); - } + err = bt_gatt_discover(conn, &sensor_discover_params); + if (err) { + LOG_ERR("Discover failed (err %d)", err); + } #endif /* ZMK_KEYMAP_HAS_SENSORS */ return BT_GATT_ITER_STOP;