Просмотр исходного кода

Merge pull request #34 from acegoal07/dev

Dev
acegoal07 1 год назад
Родитель
Сommit
29e2887c24
3 измененных файлов с 5 добавлено и 5 удалено
  1. 0 1
      README.md
  2. 1 1
      application.fam
  3. 4 3
      scenes/nfc_playlist_scene_emulation.c

+ 0 - 1
README.md

@@ -13,7 +13,6 @@ An example file can be found in the repository
 This app was design, built and tested using the <a href="https://github.com/Next-Flip/Momentum-Firmware">Momentum</a> so keep that in mind when building the FAP for yourself
 ## Supported Firmwares
 As i know these firmwares are supported and working if you know any more please let me know
-- <a href="https://github.com/Flipper-XFW/Xtreme-Firmware">Xtreme</a>
 - <a href="https://github.com/Next-Flip/Momentum-Firmware">Momentum</a>
 - <a href="https://github.com/RogueMaster/flipperzero-firmware-wPlugins">RogueMaster</a>
 ## Settings:

+ 1 - 1
application.fam

@@ -8,7 +8,7 @@ App(
     fap_category="NFC",
     fap_author="@acegoal07",
     fap_weburl="https://github.com/acegoal07/FlipperZero_NFC_Playlist/tree/main",
-    fap_version="2.3",
+    fap_version="2.4",
     fap_icon_assets="assets",
     fap_icon="assets/Playlist_10px.png",
     fap_private_libs=[

+ 4 - 3
scenes/nfc_playlist_scene_emulation.c

@@ -67,12 +67,13 @@ int32_t nfc_playlist_emulation_task(void* context) {
 
          int time_counter_ms = (options_emulate_timeout[nfc_playlist->settings.emulate_timeout]*1000);
 
-         if(!strcasestr(furi_string_get_cstr(tmp_file_ext), ".nfc")) {
+         int ext_check = furi_string_cmpi_str(tmp_file_ext, ".nfc");
+         if(ext_check != 0 && ext_check != 10) {
             if(nfc_playlist->settings.skip_error) {
                skip_delay = true;
                continue;
             }
-            furi_string_printf(tmp_header_str, "ERROR invalid file:\n%s", furi_string_get_cstr(tmp_file_name));
+            furi_string_printf(tmp_header_str, "ERROR invalid file type:\n%s", furi_string_get_cstr(tmp_file_name));
             popup_set_header(nfc_playlist->popup, furi_string_get_cstr(tmp_header_str), 64, 10, AlignCenter, AlignTop);
             start_blink(nfc_playlist, NfcPlaylistLedState_Error);
             while(time_counter_ms > 0 && EmulationState == NfcPlaylistEmulationState_Emulating) {
@@ -86,7 +87,7 @@ int32_t nfc_playlist_emulation_task(void* context) {
                skip_delay = true;
                continue;
             }
-            furi_string_printf(tmp_header_str, "ERROR not found:\n%s", furi_string_get_cstr(tmp_file_name));
+            furi_string_printf(tmp_header_str, "ERROR file not found:\n%s", furi_string_get_cstr(tmp_file_name));
             popup_set_header(nfc_playlist->popup, furi_string_get_cstr(tmp_header_str), 64, 10, AlignCenter, AlignTop);
             start_blink(nfc_playlist, NfcPlaylistLedState_Error);
             while(time_counter_ms > 0 && EmulationState == NfcPlaylistEmulationState_Emulating) {