From 0d4476d148c71a24398145aafe8fb8adf9df1809 Mon Sep 17 00:00:00 2001 From: innovaker <66737976+innovaker@users.noreply.github.com> Date: Wed, 18 Nov 2020 19:12:10 +0000 Subject: [PATCH] refactor(app): remove `_gatt_` infixes from BT DIS and BAS services See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467 --- app/Kconfig | 4 ++-- app/src/battery.c | 2 +- app/src/display/widgets/battery_status.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Kconfig b/app/Kconfig index ee26f462..fc7f2895 100644 --- a/app/Kconfig +++ b/app/Kconfig @@ -48,8 +48,8 @@ config ZMK_BLE select BT_SMP_SC_PAIR_ONLY select BT_SMP_APP_PAIRING_ACCEPT select BT_PERIPHERAL - select BT_GATT_DIS - select BT_GATT_BAS + select BT_DIS + select BT_BAS select BT_SETTINGS select SETTINGS diff --git a/app/src/battery.c b/app/src/battery.c index 777dbdb6..7a09ad7a 100644 --- a/app/src/battery.c +++ b/app/src/battery.c @@ -38,7 +38,7 @@ static int zmk_battery_update(const struct device *battery) { LOG_DBG("Setting BAS GATT battery level to %d.", state_of_charge.val1); - rc = bt_gatt_bas_set_battery_level(state_of_charge.val1); + rc = bt_bas_set_battery_level(state_of_charge.val1); if (rc != 0) { LOG_WRN("Failed to set BAS GATT battery level (err %d)", rc); diff --git a/app/src/display/widgets/battery_status.c b/app/src/display/widgets/battery_status.c index 29ae11b4..748b5a38 100644 --- a/app/src/display/widgets/battery_status.c +++ b/app/src/display/widgets/battery_status.c @@ -32,7 +32,7 @@ void battery_status_init() { void set_battery_symbol(lv_obj_t *label) { char text[2] = " "; - uint8_t level = bt_gatt_bas_get_battery_level(); + uint8_t level = bt_bas_get_battery_level(); #if IS_ENABLED(CONFIG_USB) if (zmk_usb_is_powered()) {