Преглед изворни кода

Fix BT adv name length on Xtreme firmware (#126)

WillyJL пре 2 година
родитељ
комит
0a9cc9e6b3
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      workers/bt_type_code/bt_type_code.h

+ 3 - 3
workers/bt_type_code/bt_type_code.h

@@ -7,7 +7,7 @@
 #include "../../features_config.h"
 #include "../../features_config.h"
 
 
 #if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
 #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
 #define TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN GAP_MAC_ADDR_SIZE
 #endif
 #endif
 
 
@@ -24,7 +24,7 @@ typedef struct {
     bool is_connected;
     bool is_connected;
 #if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
 #if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
     uint8_t bt_mac[TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN];
     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];
     uint8_t previous_bt_mac[TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN];
 #endif
 #endif
 } TotpBtTypeCodeWorkerContext;
 } TotpBtTypeCodeWorkerContext;
@@ -46,4 +46,4 @@ void totp_bt_type_code_worker_stop(TotpBtTypeCodeWorkerContext* context);
 void totp_bt_type_code_worker_notify(
 void totp_bt_type_code_worker_notify(
     TotpBtTypeCodeWorkerContext* context,
     TotpBtTypeCodeWorkerContext* context,
     TotpBtTypeCodeWorkerEvent event,
     TotpBtTypeCodeWorkerEvent event,
-    uint8_t flags);
+    uint8_t flags);