Proper BT custom name length handling

This commit is contained in:
Willy-JL
2023-04-08 00:54:02 +01:00
parent 525376df9e
commit 8aed004b7b
7 changed files with 11 additions and 11 deletions
@@ -230,7 +230,7 @@ bool furi_hal_bt_ensure_c2_mode(BleGlueC2Mode mode);
*/
void furi_hal_bt_set_profile_adv_name(
FuriHalBtProfile profile,
const char name[FURI_HAL_VERSION_DEVICE_NAME_LENGTH - 1]);
const char name[FURI_HAL_BT_ADV_NAME_LENGTH]);
const char* furi_hal_bt_get_profile_adv_name(FuriHalBtProfile profile);
@@ -16,9 +16,9 @@ extern "C" {
#define FURI_HAL_VERSION_NAME_LENGTH 8
#define FURI_HAL_VERSION_ARRAY_NAME_LENGTH (FURI_HAL_VERSION_NAME_LENGTH + 1)
/** BLE symbol + name */
#define FURI_HAL_BT_ADV_NAME_LENGTH (18 + 1) // 18 characters + null terminator
#define FURI_HAL_VERSION_DEVICE_NAME_LENGTH \
(1 + FURI_HAL_VERSION_ARRAY_NAME_LENGTH) + 9 // for bad kb custom name
(1 + FURI_HAL_BT_ADV_NAME_LENGTH) // Used for custom BT name, BLE symbol + name
/** OTP Versions enum */
typedef enum {