mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Hardcode HID BT name only if not yet set
This commit is contained in:
@@ -223,12 +223,15 @@ bool furi_hal_bt_start_app(FuriHalBtProfile profile, GapEventCallback event_cb,
|
||||
config->mac_address[2]++;
|
||||
}
|
||||
// Change name Flipper -> Control
|
||||
snprintf(
|
||||
config->adv_name,
|
||||
strlen("Control ") + FURI_HAL_VERSION_DEVICE_NAME_LENGTH,
|
||||
"%cControl %s",
|
||||
*furi_hal_version_get_ble_local_device_name_ptr(),
|
||||
furi_hal_version_get_ble_local_device_name_ptr() + 1);
|
||||
if(strnlen(config->adv_name, FURI_HAL_VERSION_DEVICE_NAME_LENGTH) < 2 ||
|
||||
strnlen(config->adv_name + 1, FURI_HAL_VERSION_DEVICE_NAME_LENGTH) < 1) {
|
||||
snprintf(
|
||||
config->adv_name,
|
||||
FURI_HAL_VERSION_DEVICE_NAME_LENGTH,
|
||||
"%cControl %s",
|
||||
*furi_hal_version_get_ble_local_device_name_ptr(),
|
||||
furi_hal_version_get_ble_local_device_name_ptr() + 1);
|
||||
}
|
||||
}
|
||||
if(!gap_init(config, event_cb, context)) {
|
||||
gap_thread_stop();
|
||||
|
||||
Reference in New Issue
Block a user