Browse Source

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
xmkb
innovaker 4 years ago committed by Pete Johanson
parent
commit
0d4476d148
  1. 4
      app/Kconfig
  2. 2
      app/src/battery.c
  3. 2
      app/src/display/widgets/battery_status.c

4
app/Kconfig

@ -48,8 +48,8 @@ config ZMK_BLE @@ -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

2
app/src/battery.c

@ -38,7 +38,7 @@ static int zmk_battery_update(const struct device *battery) { @@ -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);

2
app/src/display/widgets/battery_status.c

@ -32,7 +32,7 @@ void battery_status_init() { @@ -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()) {

Loading…
Cancel
Save