mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-10 23:28:10 -07:00
Proper BT custom name length handling
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
uint8_t flags);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#define BAD_KB_APP_SCRIPT_EXTENSION ".txt"
|
||||
#define BAD_KB_APP_LAYOUT_EXTENSION ".kl"
|
||||
|
||||
#define BAD_KB_MAC_ADDRESS_LEN 6 // need replace with MAC size maccro
|
||||
#define BAD_KB_ADV_NAME_MAX_LEN 18
|
||||
#define BAD_KB_ADV_NAME_MAX_LEN FURI_HAL_BT_ADV_NAME_LENGTH
|
||||
#define BAD_KB_MAC_ADDRESS_LEN GAP_MAC_ADDR_SIZE
|
||||
|
||||
typedef enum {
|
||||
BadKbAppErrorNoFiles,
|
||||
|
||||
@@ -402,7 +402,7 @@ void bt_set_profile_adv_name(Bt* bt, const char* fmt, ...) {
|
||||
furi_assert(bt);
|
||||
furi_assert(fmt);
|
||||
|
||||
char name[FURI_HAL_VERSION_DEVICE_NAME_LENGTH];
|
||||
char name[FURI_HAL_BT_ADV_NAME_LENGTH];
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
vsnprintf(name, sizeof(name), fmt, args);
|
||||
|
||||
Reference in New Issue
Block a user