- 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.
* The Code uses 6f, all my remotes use different numbers.
* So, I am getting the required Magic Number on decode,
* and saving that to the psf.
* Then on Encode, I grab that number and use that instead of 6f
* This works with the 2 remotes I have, and I dont have to patch
* the Magic Number from Calulator anymore!
*** I noticed my Chinese Fob with Magic of 0 said CRC BAD, but Car Unlocked as it captured!
*** It also works when Emulated, car unlocks.
*** The CRC check will have to be looked at!
Introduced a mutex for thread safety in protopirate_storage.c, ensuring exclusive access to file operations and preventing re-entrancy. Added bounds checks for array allocations, safety limits for directory iteration, and improved error handling and logging.
Implements encoder functions for the Subaru protocol, enabling signal generation and transmission. Updates protocol flags to support loading, saving, and sending. Refactors decoder/encoder data structures for consistency, adds dynamic memory management for file entry buffers, and improves serialization/deserialization logic for protocol data.
if you want your OLD settings.txt and saved captures to work with NEW update
you need to rename files in /subghz/protopirate from .sub to .psf extension
and place them at apps_data/proto_pirate/saved after extension renaming
config can be copied to apps_data/proto_pirate/settings.txt
Refactored capture data writing into a helper and introduced functions to save and delete a temporary file for emulation purposes. Updated the receiver info and emulate scenes to use the temp file, ensuring it is deleted on exit. Also improved filename sanitization and file list building to skip temp and hidden files.
Introduces a new custom event and button for emulating receiver info when ENABLE_EMULATE_FEATURE is defined. The emulate action saves the current protocol data and transitions to the emulate scene, with appropriate logging and error handling.
Refactored helpers/protopirate_storage.c for improved readability and maintainability, including code style updates and logic simplification. Updated KIA protocol v1 and v2 implementations for better consistency, logging, and CRC handling. Increased stack size and version in application.fam, and added keystore to file assets. These changes improve protocol support, file management, and code clarity.
Replaces dynamic allocation of file entries with a static circular buffer to improve memory usage and reliability. Updates file list building logic to keep only the most recent MAX_FILES_TO_DISPLAY entries, and ensures cache is freed on scene exit to save memory. Also simplifies filename sanitization and capture saving logic.
Improves and refactors protopirate_storage to add cache invalidation, file existence checks, and proper resource management. Updates emulation scene to ensure correct cleanup, resource allocation, and transmitter setup. Adds menu reset to receiver view and ensures proper widget reset in receiver info. Updates saved info scene to use new storage close function.
Introduces a static file list cache in protopirate_storage to improve file listing and sorting, with new functions to build, free, and access the cache. Updates file save logic to better handle protocol-specific fields and serialization, and ensures memory is freed on app exit. Adds debug logging for file operations and improves robustness in file handling throughout the app.
Introduces a save button to the sub decode scene, allowing users to save decoded or partially decoded signals. Refactors history management to properly free resources and automatically remove the oldest entry when the history is full. Updates protocol button mappings and UI labels for better clarity and consistency.
Adds detailed logging and error handling for radio device selection and connection, clarifies external/internal device status throughout the app, and updates the receiver view to display EXT/INT status in the UI. Also refactors code for better maintainability and debugging, ensuring correct device selection and status reporting.
Introduces ProtoPirateSettings struct and helpers to load and save user settings (frequency, preset, auto-save, hopping) to disk. The app now loads settings on startup and saves them on exit, applying validation and defaults as needed. Updates initialization and teardown logic to use these settings.