@@ -13,11 +13,8 @@ int32_t nfc_playlist_emulation_task(void* context) {
13
13
14
14
Storage * storage = furi_record_open (RECORD_STORAGE );
15
15
Stream * stream = file_stream_alloc (storage );
16
- bool skip_delay = false;
17
16
18
- popup_reset (nfc_playlist -> popup );
19
17
popup_set_context (nfc_playlist -> popup , nfc_playlist );
20
-
21
18
view_dispatcher_switch_to_view (nfc_playlist -> view_dispatcher , NfcPlaylistView_Popup );
22
19
23
20
if (nfc_playlist -> settings .playlist_length == 0 ) {
@@ -33,9 +30,9 @@ int32_t nfc_playlist_emulation_task(void* context) {
33
30
34
31
bool delay_setting_on = nfc_playlist -> settings .emulate_delay > 0 ;
35
32
bool delay_active = false;
33
+ bool skip_delay = false;
36
34
37
35
while (stream_read_line (stream , line ) && EmulationState == NfcPlaylistEmulationState_Emulating ) {
38
-
39
36
furi_string_trim (line );
40
37
41
38
if (furi_string_empty (line )) {
@@ -62,7 +59,6 @@ int32_t nfc_playlist_emulation_task(void* context) {
62
59
63
60
if (EmulationState != NfcPlaylistEmulationState_Emulating ) {break ;}
64
61
65
- char * file_path = (char * )furi_string_get_cstr (line );
66
62
path_extract_filename (line , tmp_file_name , false);
67
63
path_extract_ext_str (line , tmp_file_ext );
68
64
@@ -82,7 +78,7 @@ int32_t nfc_playlist_emulation_task(void* context) {
82
78
furi_delay_ms (50 );
83
79
time_counter_ms -= 50 ;
84
80
};
85
- } else if (!storage_file_exists (storage , file_path )) {
81
+ } else if (!storage_file_exists (storage , furi_string_get_cstr ( line ) )) {
86
82
if (nfc_playlist -> settings .skip_error ) {
87
83
skip_delay = true;
88
84
continue ;
@@ -99,7 +95,7 @@ int32_t nfc_playlist_emulation_task(void* context) {
99
95
} else {
100
96
furi_string_printf (tmp_header_str , "Emulating:\n%s" , furi_string_get_cstr (tmp_file_name ));
101
97
popup_set_header (nfc_playlist -> popup , furi_string_get_cstr (tmp_header_str ), 64 , 10 , AlignCenter , AlignTop );
102
- nfc_playlist_emulation_worker_set_nfc_data (nfc_playlist -> nfc_playlist_emulation_worker , file_path );
98
+ nfc_playlist_emulation_worker_set_nfc_data (nfc_playlist -> nfc_playlist_emulation_worker , ( char * ) furi_string_get_cstr ( line ) );
103
99
nfc_playlist_emulation_worker_start (nfc_playlist -> nfc_playlist_emulation_worker );
104
100
start_blink (nfc_playlist , NfcPlaylistLedState_Normal );
105
101
while (nfc_playlist_emulation_worker_is_emulating (nfc_playlist -> nfc_playlist_emulation_worker ) && time_counter_ms > 0 && EmulationState == NfcPlaylistEmulationState_Emulating ) {
0 commit comments