mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 20:58:36 -07:00
Merge branch 'dev' of https://github.com/DarkFlippers/unleashed-firmware into xfw-dev
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "../lfrfid_i.h"
|
||||
#include <bit_lib.h>
|
||||
#include "tools/t5577.h"
|
||||
#define TAG "Clear T5577"
|
||||
|
||||
@@ -21,8 +22,7 @@ static void lfrfid_clear_t5577_password_and_config_to_EM(LfRfid* app) {
|
||||
};
|
||||
|
||||
// Clear custom password
|
||||
uint32_t custom_pass = (app->password[0] << 24) | (app->password[1] << 16) |
|
||||
(app->password[2] << 8) | (app->password[3]);
|
||||
uint32_t custom_pass = bit_lib_bytes_to_num_be(app->password, 4);
|
||||
snprintf(curr_buf, sizeof(curr_buf), "Custom password");
|
||||
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../lfrfid_i.h"
|
||||
#include "bit_lib.h"
|
||||
#include "gui/scene_manager.h"
|
||||
|
||||
int next_scene;
|
||||
@@ -16,7 +17,7 @@ void lfrfid_scene_enter_password_on_enter(void* context) {
|
||||
const uint32_t* password_list = lfrfid_get_t5577_default_passwords(&password_list_size);
|
||||
uint32_t pass = password_list[furi_get_tick() % password_list_size];
|
||||
|
||||
for(uint8_t i = 0; i < 4; i++) app->password[4 - (i + 1)] = (pass >> (8 * i)) & 0xFF;
|
||||
bit_lib_num_to_bytes_be(pass, 4, app->password);
|
||||
}
|
||||
|
||||
byte_input_set_header_text(byte_input, "Enter the password in hex");
|
||||
|
||||
Reference in New Issue
Block a user