Alexander Kopachov 2 лет назад
Родитель
Сommit
0aa5b7b528

+ 4 - 4
build.ps1

@@ -13,10 +13,10 @@ function Get-LatestDirectory {
 
 
 $build_commands = @(
 $build_commands = @(
     [PSCustomObject]@{
     [PSCustomObject]@{
-        Name = "Official Dev \ Unleashed";
+        Name = "Official Dev";
         FbtSwitch = "od";
         FbtSwitch = "od";
         FirmwarePath = "flipperzero-firmware_official_dev";
         FirmwarePath = "flipperzero-firmware_official_dev";
-        ArtifactName = "totp_official-dev_unleashed_fw{FEATURES_SUFFIX}.fap";
+        ArtifactName = "totp_official-dev_fw{FEATURES_SUFFIX}.fap";
     }
     }
     [PSCustomObject]@{
     [PSCustomObject]@{
         Name = "Official Stable";
         Name = "Official Stable";
@@ -25,10 +25,10 @@ $build_commands = @(
         ArtifactName = "totp_official-stable_fw{FEATURES_SUFFIX}.fap";
         ArtifactName = "totp_official-stable_fw{FEATURES_SUFFIX}.fap";
     }
     }
     [PSCustomObject]@{
     [PSCustomObject]@{
-        Name = "Xtreme";
+        Name = "Xtreme \ Unleashed";
         FbtSwitch = "x";
         FbtSwitch = "x";
         FirmwarePath = "flipperzero-firmware_xtreme";
         FirmwarePath = "flipperzero-firmware_xtreme";
-        ArtifactName = "totp_xtreme_fw{FEATURES_SUFFIX}.fap";
+        ArtifactName = "totp_xtreme_unleashed_fw{FEATURES_SUFFIX}.fap";
     }
     }
 )
 )
 
 

+ 1 - 1
fbt.ps1

@@ -15,7 +15,7 @@ elseif (('official-stable', 'off-stbl', 'os').Contains($args[0])) {
 } elseif (('xtreme', 'xt', 'x').Contains($args[0])) {
 } elseif (('xtreme', 'xt', 'x').Contains($args[0])) {
     $firmware_path = "flipperzero-firmware_xtreme"
     $firmware_path = "flipperzero-firmware_xtreme"
     $firmware_name = "Xtreme"
     $firmware_name = "Xtreme"
-    $FW_CDEF = "TOTP_FIRMWARE_XTREME"
+    $FW_CDEF = "TOTP_FIRMWARE_XTREME_UL"
 }
 }
 else {
 else {
     throw "Unable to recognize which firmware to use"
     throw "Unable to recognize which firmware to use"

+ 1 - 1
flipperzero-firmware_official_dev

@@ -1 +1 @@
-Subproject commit 8d2ea14f0694af81f7e0b04232e910e504d8cfc4
+Subproject commit d9a9fa0c10ab9c2dd480c6abf2d90fbf53b9e289

+ 1 - 1
flipperzero-firmware_official_stable

@@ -1 +1 @@
-Subproject commit 16b976478cbd6903936ef2f6622d429bdcffbebb
+Subproject commit 406cb8b7116cc94d8f07e3c7fdac60df204ee3d4

+ 1 - 1
flipperzero-firmware_xtreme

@@ -1 +1 @@
-Subproject commit ce62f4da3215e104288b00845434488440dd0032
+Subproject commit 8b9af91a188abbc832fd8afd1ff205606397c317

+ 5 - 5
totp/features_config.h

@@ -11,22 +11,22 @@
 // List of compatible firmwares
 // List of compatible firmwares
 #define TOTP_FIRMWARE_OFFICIAL_STABLE (1)
 #define TOTP_FIRMWARE_OFFICIAL_STABLE (1)
 #define TOTP_FIRMWARE_OFFICIAL_DEV (2)
 #define TOTP_FIRMWARE_OFFICIAL_DEV (2)
-#define TOTP_FIRMWARE_XTREME (3)
+#define TOTP_FIRMWARE_XTREME_UL (3)
 // End of list
 // End of list
 
 
 // Checking FlipC.org definitions (https://github.com/playmean/fap-list/issues/9)
 // Checking FlipC.org definitions (https://github.com/playmean/fap-list/issues/9)
 #if defined(TARGET_FIRMWARE_OFFICIAL)
 #if defined(TARGET_FIRMWARE_OFFICIAL)
 #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE
 #define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_STABLE
 #elif defined(TARGET_FIRMWARE_UNLEASHED)
 #elif defined(TARGET_FIRMWARE_UNLEASHED)
-#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_OFFICIAL_DEV
+#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL
 #elif defined(TARGET_FIRMWARE_XTREME)
 #elif defined(TARGET_FIRMWARE_XTREME)
-#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME
+#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL
 #endif
 #endif
 // End of FlipC.org definition checks
 // End of FlipC.org definition checks
 
 
-// If target firmware is not yet set, default it to Xtreme as I'm using it, and it is cool :)
+// If target firmware is not yet set, default it to Xtreme\Unleashed as I'm using it, and it is cool :)
 #ifndef TOTP_TARGET_FIRMWARE
 #ifndef TOTP_TARGET_FIRMWARE
-#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME
+#define TOTP_TARGET_FIRMWARE TOTP_FIRMWARE_XTREME_UL
 #endif
 #endif
 
 
 // List of available font for TOTP code
 // List of available font for TOTP code

+ 1 - 1
totp/services/crypto/crypto.c

@@ -90,7 +90,7 @@ CryptoSeedIVResult
             max_i = uid_size;
             max_i = uid_size;
         }
         }
 
 
-        const uint8_t* uid = furi_hal_version_uid();
+        const uint8_t* uid = (const uint8_t*)UID64_BASE;
         for(uint8_t i = 0; i < max_i; i++) {
         for(uint8_t i = 0; i < max_i; i++) {
             plugin_state->iv[i] = plugin_state->iv[i] ^ uid[i];
             plugin_state->iv[i] = plugin_state->iv[i] ^ uid[i];
         }
         }

+ 7 - 7
totp/workers/bt_type_code/bt_type_code.c

@@ -13,7 +13,7 @@
 #include "../type-code-common.h"
 #include "../type-code-common.h"
 #include "../../features_config.h"
 #include "../../features_config.h"
 
 
-#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
+#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL
 #define TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN FURI_HAL_BT_ADV_NAME_LENGTH
 #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
@@ -29,7 +29,7 @@ struct TotpBtTypeCodeWorkerContext {
     Bt* bt;
     Bt* bt;
     bool is_advertising;
     bool is_advertising;
     bool is_connected;
     bool is_connected;
-#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
+#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL
     char previous_bt_name[TOTP_BT_WORKER_BT_ADV_NAME_MAX_LEN];
     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
@@ -39,7 +39,7 @@ static inline bool totp_type_code_worker_stop_requested() {
     return furi_thread_flags_get() & TotpBtTypeCodeWorkerEventStop;
     return furi_thread_flags_get() & TotpBtTypeCodeWorkerEventStop;
 }
 }
 
 
-#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
+#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL
 static void totp_type_code_worker_bt_set_app_mac(uint8_t* mac) {
 static void totp_type_code_worker_bt_set_app_mac(uint8_t* mac) {
     uint8_t max_i;
     uint8_t max_i;
     size_t uid_size = furi_hal_version_uid_size();
     size_t uid_size = furi_hal_version_uid_size();
@@ -49,7 +49,7 @@ static void totp_type_code_worker_bt_set_app_mac(uint8_t* mac) {
         max_i = TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN;
         max_i = TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN;
     }
     }
 
 
-    const uint8_t* uid = furi_hal_version_uid();
+    const uint8_t* uid = (const uint8_t*)UID64_BASE;
     memcpy(mac, uid, max_i);
     memcpy(mac, uid, max_i);
     for(uint8_t i = max_i; i < TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN; i++) {
     for(uint8_t i = max_i; i < TOTP_BT_WORKER_BT_MAC_ADDRESS_LEN; i++) {
         mac[i] = 0;
         mac[i] = 0;
@@ -161,7 +161,7 @@ TotpBtTypeCodeWorkerContext* totp_bt_type_code_worker_init() {
     furi_delay_ms(200);
     furi_delay_ms(200);
     bt_keys_storage_set_storage_path(context->bt, HID_BT_KEYS_STORAGE_PATH);
     bt_keys_storage_set_storage_path(context->bt, HID_BT_KEYS_STORAGE_PATH);
 
 
-#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
+#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL
     memcpy(
     memcpy(
         &context->previous_bt_name[0],
         &context->previous_bt_name[0],
         furi_hal_bt_get_profile_adv_name(FuriHalBtProfileHidKeyboard),
         furi_hal_bt_get_profile_adv_name(FuriHalBtProfileHidKeyboard),
@@ -184,7 +184,7 @@ TotpBtTypeCodeWorkerContext* totp_bt_type_code_worker_init() {
 
 
     furi_hal_bt_start_advertising();
     furi_hal_bt_start_advertising();
 
 
-#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
+#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL
     bt_enable_peer_key_update(context->bt);
     bt_enable_peer_key_update(context->bt);
 #endif
 #endif
 
 
@@ -211,7 +211,7 @@ void totp_bt_type_code_worker_free(TotpBtTypeCodeWorkerContext* context) {
     furi_delay_ms(200);
     furi_delay_ms(200);
     bt_keys_storage_set_default_path(context->bt);
     bt_keys_storage_set_default_path(context->bt);
 
 
-#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME
+#if TOTP_TARGET_FIRMWARE == TOTP_FIRMWARE_XTREME_UL
     furi_hal_bt_set_profile_adv_name(FuriHalBtProfileHidKeyboard, context->previous_bt_name);
     furi_hal_bt_set_profile_adv_name(FuriHalBtProfileHidKeyboard, context->previous_bt_name);
     furi_hal_bt_set_profile_mac_addr(FuriHalBtProfileHidKeyboard, context->previous_bt_mac);
     furi_hal_bt_set_profile_mac_addr(FuriHalBtProfileHidKeyboard, context->previous_bt_mac);
 #endif
 #endif