rfid / subghz modified for sfw_mode support

This commit is contained in:
jbohack
2022-12-30 15:33:36 -05:00
parent 83c0f941df
commit ce9db8691f
10 changed files with 80 additions and 10 deletions

View File

@@ -1,4 +1,5 @@
#include "../lfrfid_i.h"
#include "../../../settings/desktop_settings/desktop_settings_app.h"
#define RAW_READ_TIME 5000
@@ -28,12 +29,18 @@ static void timer_callback(void* context) {
void lfrfid_scene_raw_read_on_enter(void* context) {
LfRfid* app = context;
Popup* popup = app->popup;
DesktopSettings* settings = malloc(sizeof(DesktopSettings));
DESKTOP_SETTINGS_LOAD(settings);
LfRfidReadRawState* state = malloc(sizeof(LfRfidReadRawState));
scene_manager_set_scene_state(app->scene_manager, LfRfidSceneRawRead, (uint32_t)state);
state->string_file_name = furi_string_alloc();
popup_set_icon(popup, 0, 3, &I_RFIDDolphinReceive_97x61);
if (settings->sfw_mode) {
popup_set_icon(popup, 0, 3, &I_RFIDDolphinReceive_97x61_sfw);
}
else {
popup_set_icon(popup, 0, 3, &I_RFIDDolphinReceive_97x61);
}
view_dispatcher_switch_to_view(app->view_dispatcher, LfRfidViewPopup);
lfrfid_worker_start_thread(app->lfworker);
lfrfid_make_app_folder(app);
@@ -58,6 +65,7 @@ void lfrfid_scene_raw_read_on_enter(void* context) {
state->is_psk = false;
state->error = false;
free(settings);
}
bool lfrfid_scene_raw_read_on_event(void* context, SceneManagerEvent event) {