Zachary Weiss 2 лет назад
Родитель
Сommit
17c8e3bbc0
2 измененных файлов с 6 добавлено и 4 удалено
  1. 3 3
      README.md
  2. 3 1
      mag_device.c

+ 3 - 3
README.md

@@ -11,14 +11,14 @@ For those desiring better TX than the internal RFID coil can offer, one can buil
 
 ## TODO
 Known bugs:
-- [ ] File format issues when Track 2 data exists but Track 1 is left empty; doesn't seem to be setting the Track 2 field with anything (doesn't overwrite existing data). However, `flipper_format_read_string()` doesn't seem to return `false`. Is the bug in my code, or with `flipper_format`?
-  - [ ] Review how it's done in [unirfremix (Sub-GHz Remote)](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/applications/main/unirfremix/unirfremix_app.c), as IIRC that can handle empty keys, despite using the `flipper_format` lib for parsing.
+- [X] File format issues when Track 2 data exists but Track 1 is left empty; doesn't seem to be setting the Track 2 field with anything (doesn't overwrite existing data). However, `flipper_format_read_string()` doesn't seem to return `false`. Is the bug in my code, or with `flipper_format`?
+  - [X] Review how it's done in [unirfremix (Sub-GHz Remote)](https://github.com/DarkFlippers/unleashed-firmware/blob/dev/applications/main/unirfremix/unirfremix_app.c), as IIRC that can handle empty keys, despite using the `flipper_format` lib for parsing.
 - [ ] Attempting to play a track that doesn't have data results in a crash (as one might expect). Need to lock out users from selecting empty tracks in the config menu or do better error handling
 - [ ] Custom text input scene with expanded characterset (Add Manually) has odd behavior when navigating the keys near the numpad
 
 Emulation:
 - [ ] Validate arha's bitmap changes, transition over to it fully
-- [ ] Test piezo TX (prelim tests promising)
+- [X] Test piezo TX (prelim tests promising)
 - [ ] General code cleanup
 - [ ] Reverse track precompute & replay (should be simple with new bitmap approach; just iterate through bytes backwards, bits forwards?)
 - [ ] Parameter tuning, find best defaults, troubleshoot improperly parsed TX

+ 3 - 1
mag_device.c

@@ -147,8 +147,10 @@ static bool mag_device_load_data(MagDevice* mag_dev, FuriString* path, bool show
             furi_string_printf(temp_str, "Track %d", i + 1);
             if(!flipper_format_read_string(
                    file, furi_string_get_cstr(temp_str), mag_dev->dev_data.track[i].str)) {
+                FURI_LOG_D(TAG, "Could not read track %d data", i + 1);
+
+                // TODO: smarter load handling now that it is acceptible for some tracks to be empty
                 data_read = false;
-                break;
             }
         }