Commit Graph

42 Commits

Author SHA1 Message Date
gullradriel e6f17c0afb check return of malloc on raw_file_reader_alloc 2026-02-10 00:54:01 +01:00
gullradriel 4b9c3cefe8 fix use of unsigned (size_t) when i<was_read, i-was_read wraps to a huge positive value. Cast solves it as on F0 size_t can't be bigger than int32_t, AFAIK 2026-02-10 00:52:31 +01:00
gullradriel 34bf3398ed restore OTG power state (if enabled before the app), fix order in radio_device_loader_end (in case subghz_devices_end() needs the device powered), inconsitency with subghz_devices_begin 2026-02-10 00:30:06 +01:00
gullradriel 00ba9be506 furi_check protopirate_storage_save_capture params 2026-02-10 00:11:11 +01:00
gullradriel 52b18c5b4b write capture helpers 2026-02-10 00:07:22 +01:00
gullradriel 8fd9e73a38 add missing tx_power init, version check, typo on TxPower loading error message 2026-02-09 22:25:58 +01:00
gullradriel fd6ba8aaff change furi_assert to furi_check 2026-02-09 21:35:58 +01:00
MX e980cf4a41 define 2026-02-09 17:02:06 +03:00
MX 7770143097 fix most of the issues
- 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
2026-02-09 16:47:10 +03:00
MMX 767bddf94b Merge branch 'main' into zero-mega 2026-02-06 16:36:53 -05:00
0mega 8a7759108b Vag Encoder WIP 2026-02-04 07:41:12 +01:00
MX 99746e32ca remove WIP add manually 2026-02-03 17:46:44 +03:00
MX c084750cf3 add changes by @RalphWiggum 2026-02-03 17:09:09 +03:00
RocketGod 11253a9f81 Fix memory issues and crashes 2026-01-30 17:12:54 -08:00
MX a50067aed8 Merge branch 'rg_main' into zm 2026-01-27 03:26:05 +03:00
RocketGod b69c23ac19 Refactor storage and radio initialization logic
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.
2026-01-26 10:14:25 -08:00
zero-mega b76d1e7dbc Add PSA Encoder 2026-01-26 18:54:57 +01:00
RocketGod 55e8068ed3 Remove mutex usage and simplify file storage logic
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.
2026-01-25 22:22:45 -08:00
MX 65487f7bf8 Merge branch 'rg_main' into USB-Serial-Fix 2026-01-23 16:23:29 +03:00
Leeroy eabbff45d3 Add BS Magic Number calculation to Ford V0
* 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!
2026-01-20 13:21:51 +11:00
RocketGod 2354ae6c6b Add mutex locking and safety checks to storage operations
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.
2026-01-18 10:09:15 -08:00
RocketGod 36a8518983 Add encoder support for Subaru protocol
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.
2026-01-16 14:13:56 -08:00
MX 62db1e63f9 Fix paths, fix missing event
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
2026-01-14 23:23:38 +03:00
RocketGod d7b6616445 Add temp file support for emulation in storage
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.
2026-01-13 18:30:26 -08:00
RocketGod c46cf2f6ab Add emulate feature to receiver info scene
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.
2026-01-13 12:45:26 -08:00
MX 822f3ac1c0 Fixes and improvements 2026-01-12 23:29:01 +03:00
MX 31c09401b6 apply formatting and add clang format config 2026-01-12 23:20:34 +03:00
RocketGod a75f80059a Revert "Refactor and enhance protocol storage and KIA protocol handling"
This reverts commit 52baeb9e86.
2026-01-11 20:33:25 -08:00
RocketGod 52baeb9e86 Refactor and enhance protocol storage and KIA protocol 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.
2026-01-11 20:28:31 -08:00
RocketGod dc5962525d Refactor file list to use static circular buffer
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.
2026-01-11 16:13:46 -08:00
RocketGod 01e0e1f30c Refactor and extend storage and emulation handling
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.
2026-01-11 15:02:39 -08:00
0mega bdb4585f9a Storage: Add filename sanitization for protocol names 2026-01-02 17:14:52 +01:00
RocketGod d520db8d81 Refactor file storage: add file list cache and improve save logic
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.
2025-12-21 22:44:04 -08:00
RocketGod aa645867e4 Add save feature to sub decode and improve history cleanup
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.
2025-12-21 21:58:36 -08:00
RocketGod f77b3e6cf9 Improve radio device handling and UI indicators
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.
2025-12-20 22:37:10 -08:00
RocketGod 92645220ad Add persistent settings
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.
2025-12-20 19:08:47 -08:00
RocketGod 952689c8a7 Did some stuff... Mainly proved encoder works. Kia V0 mostly working. Made the emulator scene extra sexy. Time for bed. 😎🚀 2025-12-14 22:48:02 -08:00
RocketGod d2eb2402d5 Mockup of emulator. Not working yet. 2025-12-10 11:41:47 -08:00
RocketGod d928172103 Allow saving captured signals with details 2025-12-10 10:10:33 -08:00
RocketGod b375a67790 About screen sexiness 2025-12-07 21:22:43 -08:00
MX 7f49bbb1d0 protopiratify and fix known issues 2025-12-08 07:23:40 +03:00
RocketGod ccaeeee41d Initial commit 2025-12-06 15:17:56 -08:00