From 0a9cc9e6b3015e2f7daa9cee465634e286a7edf4 Mon Sep 17 00:00:00 2001 From: WillyJL <49810075+Willy-JL@users.noreply.github.com> Date: Sat, 8 Apr 2023 20:28:39 +0100 Subject: [PATCH] Fix BT adv name length on Xtreme firmware (#126) --- workers/bt_type_code/bt_type_code.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/workers/bt_type_code/bt_type_code.h b/workers/bt_type_code/bt_type_code.h index 6f49aff478f..1c59ea3e9bc 100644 --- a/workers/bt_type_code/bt_type_code.h +++ b/workers/bt_type_code/bt_type_code.h @@ -7,7 +7,7 @@ #include "../../features_config.h" #if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME -#define TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN (18) +#define TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN FURI_HAL_BT_ADV_NAME_LENGTH #define TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN GAP_MAC_ADDR_SIZE #endif @@ -24,7 +24,7 @@ typedef struct { bool is_connected; #if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME uint8_t bt_mac[TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN]; - char previous_bt_name[TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN + 1]; + char previous_bt_name[TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN]; uint8_t previous_bt_mac[TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN]; #endif } TotpBtTypeCodeWorkerContext; @@ -46,4 +46,4 @@ void totp_bt_type_code_worker_stop(TotpBtTypeCodeWorkerContext* context); void totp_bt_type_code_worker_notify( TotpBtTypeCodeWorkerContext* context, TotpBtTypeCodeWorkerEvent event, - uint8_t flags); \ No newline at end of file + uint8_t flags);