- aut64_encrypt/decrypt/pack/unpack now return int
- API now uses pointers everywhere
- Made 0xFF sentinel meaningful
- Strict key validation added and enforced
- aut64_encrypt, aut64_decrypt, and aut64_pack fail fast if the key is invalid
- aut64_unpack() unpacks into dest, then validates the resulting key
- Pointer validation for public API functions
- Removed sizeof(...) loop bounds and replaced with defined sizes
- Avoid reading uninitialized memory / overwriting incorrectly
- Converted hardcoded message[7] to message[AUT64_BLOCK_SIZE - 1].
- Upgraded internal array dimensions to use defines
- fix alloc / free
- fix raw file reading buffer size
- remake raw file reading logic
- remake sub decode to stop when heap is low
- disable 2 scenes to free heap
- add comments
- fix crashes caused by previous alloc/free fixes
- alloc worker only for RX
- fix emulation scene hold
- fix emulation scene back button
Removes the file list cache and related logic from protopirate_storage, deferring file browsing to the dialogs file browser. Refactors radio initialization and deinitialization to be performed on-demand in relevant scenes, reducing memory usage and improving modularity. Updates scene logic to use the new file browser and radio management, and adds detailed logging and memory usage tracking for debugging. Also includes minor formatting and heap logging improvements. Will leave logging until we don't need it anymore.
Eliminated all mutex-based locking and re-entrancy logic from protopirate_storage.c, simplifying file list management and related functions. Reduced MAX_FILES_TO_DISPLAY to 30 and shortened file entry name buffer. Updated file list builder to allocate and free memory as needed, and added yielding in file enumeration to prevent watchdog lockups. In protopirate_scene_saved.c, limited displayed items to 20 and added GUI yield to prevent lockup. Reduced encoder upload buffer size from 1024 to 512 in fiat_v0.c and ford_v0.c.
Introduced the FORD_V0_DEBUG_BITS macro to enable detailed debug logging of each bit processed in the Ford V0 protocol decoder. Logging is wrapped in a preprocessor check to avoid performance impact unless explicitly enabled.