فهرست منبع

Fixed bug where crash occurs after deleting an item

David Lee 1 سال پیش
والد
کامیت
b64e36d9c0
5فایلهای تغییر یافته به همراه15 افزوده شده و 19 حذف شده
  1. 6 2
      README.md
  2. 2 10
      application.fam
  3. 2 4
      docs/README.md
  4. 3 0
      docs/changelog.md
  5. 2 3
      models/cross/xremote_cross_remote.c

+ 6 - 2
README.md

@@ -2,9 +2,9 @@
 
 ## Current State
 - Infrared working
+- SubGhz working
 - Pause working
-- SubGhz in Development
-- Edit/Rename/Delete features in development
+- IR Timing features in development
 
 ## What this is?
 This app combines commands used in IR and SubGhz into playlists that can be run with one click
@@ -30,6 +30,10 @@ Wouldn't it be nicer to simply click one button and let everything happen? This
 - Add pauses, becaue target systems are not always fast enough for multiple commands<br>
 - Run file containing chained IR & SubGhz commands<br>
 
+### Limitations
+SubGhz commands will stop working if you move/rename/delete the original files on your Flipper. This is because 
+of how the Flippers SubGhz worker expects data. 
+
 ## How to install on Flipper Zero
 - If you do not have one, download a firmware<br>
 - Plug your Flipper Zero in via USB. <br>

+ 2 - 10
application.fam

@@ -3,20 +3,12 @@ App(
     name="Cross Remote",
     apptype=FlipperAppType.EXTERNAL,
     entry_point="xremote_app",
-    cdefines=["APP_XREMOTE"],
-    requires=[
-        "gui",
-        "storage",
-        "dialogs",
-    ],
     stack_size=3 * 1024,
-    order=10,
-    fap_libs=["assets"],
     fap_icon="icons/xremote_10px.png",
     fap_icon_assets="icons",
-    fap_version="1.1",
+    fap_version="2.0",
     fap_category="Infrared",
     fap_author="Leedave",
     fap_description="One-Click, sends multiple commands",
-    fap_weburl="https://github.com/leedave/Leeds-Flipper-Zero-Applications"
+    fap_weburl="https://github.com/leedave/flipper-zero-cross-remote"
 )

+ 2 - 4
docs/README.md

@@ -1,18 +1,16 @@
 ## Cross Remote
 
-This app combines your IR commands into a playlist that can be run with one click. Pauses can be set inbetween, as IR devices typically are not so fast. 
+This app combines your IR and SubGhz commands into a playlist that can be run with one click. Pauses can be set inbetween, as IR/SubGhz devices typically are not so fast. 
 
 ## Features
 - Read out commands you recorded in the IR app
+- Read out commands you saved as .sub files
 - Combine commands to a chain/playlist 
 - Add pauses inbetween commands 
 - Save your command chain / playlist to flipper
 - Disable LED effects if not wanted
 - Configure duration of IR Signals
 
-## In Development
-- Ability to also add SubGhz commands 
-
 ## What good is this?
 
 Example what you command chain (playlist) could do with one click

+ 3 - 0
docs/changelog.md

@@ -2,6 +2,9 @@
 - SubGhz Functionality added
 - Slight change in Storage format to enalbe individual IR timings later (feature request)
 - Fixed more memory leaks
+- Fixed error where Flipper crashes after deleting a command chain
+- Updated Manifest for better CFW support
+- Updated readme for new inputs
 
 ## v1.1
 - Patched memory leak in storage

+ 2 - 3
models/cross/xremote_cross_remote.c

@@ -252,7 +252,7 @@ bool xremote_cross_remote_save_new(CrossRemote* remote, const char* name) {
 static void xremote_cross_remote_reset(CrossRemote* remote) {
     furi_string_reset(remote->name);
     furi_string_reset(remote->path);
-    CrossRemoteItemArray_clear(remote->items);
+    xremote_cross_remote_clear_items(remote);
     remote->transmitting = 0;
 }
 
@@ -260,9 +260,8 @@ bool xremote_cross_remote_delete(CrossRemote* remote) {
     Storage* storage = furi_record_open(RECORD_STORAGE);
     FS_Error status = storage_common_remove(storage, furi_string_get_cstr(remote->path));
 
-    xremote_cross_remote_reset(remote);
-
     furi_record_close(RECORD_STORAGE);
+    xremote_cross_remote_reset(remote);
     return (status == FSE_OK || status == FSE_NOT_EXIST);
 }