Skip to content

Commit

Permalink
fix(ble): Fix building split code w/o settings
Browse files Browse the repository at this point in the history
* Properly exclude storing peripheral addresses to settings when
  settings support isn't turned on.
  • Loading branch information
petejohanson committed Dec 31, 2024
1 parent f00d72a commit 0521893
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,11 @@ int zmk_ble_put_peripheral_addr(const bt_addr_le_t *addr) {
LOG_DBG("Storing peripheral %s in slot %d", addr_str, i);
bt_addr_le_copy(&peripheral_addrs[i], addr);

#if IS_ENABLED(CONFIG_SETTINGS)
char setting_name[32];
sprintf(setting_name, "ble/peripheral_addresses/%d", i);
settings_save_one(setting_name, addr, sizeof(bt_addr_le_t));

#endif // IS_ENABLED(CONFIG_SETTINGS)
return i;
}
}
Expand Down

0 comments on commit 0521893

Please sign in to comment.