Update app/src/ble.c

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
This commit is contained in:
KN 2022-03-15 12:46:31 -05:00 committed by GitHub
parent cc6ab5d52c
commit c6a3f98833
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -186,7 +186,7 @@ int update_advertising() {
struct bt_conn *conn; struct bt_conn *conn;
enum advertising_type desired_adv = ZMK_ADV_NONE; enum advertising_type desired_adv = ZMK_ADV_NONE;
uint8_t max_device_name_length = (active_profile > 9) ? 13 : 14; uint8_t max_device_name_length = DEVICE_NAME_ARRAY_MAX_SIZE - ((active_profile > 9) ? 4 : 3);
if (max_device_name_length > strlen(DEVICE_NAME)) { if (max_device_name_length > strlen(DEVICE_NAME)) {
max_device_name_length = DEVICE_NAME_LEN; max_device_name_length = DEVICE_NAME_LEN;
} }