Skip to content

Commit 3087d4b

Browse files
author
David Lee
committed
Fixed initial crash after creation of chain with Subghz element
1 parent 99ae845 commit 3087d4b

File tree

6 files changed

+6
-22
lines changed

6 files changed

+6
-22
lines changed

application.fam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ App(
66
stack_size=3 * 1024,
77
fap_icon="icons/xremote_10px.png",
88
fap_icon_assets="icons",
9-
fap_version="2.2",
9+
fap_version="2.3",
1010
fap_category="Infrared",
1111
fap_author="Leedave",
1212
fap_description="One-Click, sends multiple commands",

docs/changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.3
2+
- Fixed Crash after creating chains with SubGhz Items
3+
14
## 2.2
25
- Fixed incompatibility to Flipper-catalog / uFBT compiler
36

models/subghz/xremote_sg_remote.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
struct SubGhzRemote {
66
FuriString* name;
77
FuriString* filename;
8-
FuriString* path;
98
};
109

1110
const char* xremote_sg_remote_get_name(SubGhzRemote* remote) {
@@ -20,13 +19,11 @@ SubGhzRemote* xremote_sg_remote_alloc() {
2019
SubGhzRemote* remote = malloc(sizeof(SubGhzRemote));
2120
remote->name = furi_string_alloc();
2221
remote->filename = furi_string_alloc();
23-
remote->path = furi_string_alloc();
24-
22+
2523
return remote;
2624
}
2725

2826
void xremote_sg_remote_free(SubGhzRemote* remote) {
29-
furi_string_free(remote->path);
3027
furi_string_free(remote->name);
3128
furi_string_free(remote->filename);
3229

@@ -52,10 +49,7 @@ bool xremote_sg_remote_load(SubGhzRemote* remote, FuriString* path) {
5249
if(dotPosition != NULL) { // check if there is a dot in the file name
5350
*dotPosition = '\0'; // set the dot position to NULL character to truncate the string
5451
}
55-
//remote->name = fileName;
5652
furi_string_set_str(remote->name, fileName);
57-
//furi_string_set_str(remote->filename, fileName);
58-
//free(fileName);
5953
uint32_t version;
6054
if(!flipper_format_read_header(ff, buf, &version)) break;
6155
if(!furi_string_equal(buf, "Flipper SubGhz RAW File") || (version != 1)) break;

scenes/xremote_scene_ir_list.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ void xremote_scene_ir_list_on_enter(void* context) {
2323

2424
if(success) {
2525
//Load Remote Button View
26-
//scene_manager_next_scene(app->scene_manager, XRemoteSceneCreateAdd);
27-
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
2826
scene_manager_next_scene(app->scene_manager, XRemoteSceneIrRemote);
2927
} else {
30-
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
3128
scene_manager_previous_scene(app->scene_manager);
3229
}
3330
}

scenes/xremote_scene_sg_list.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ void xremote_scene_sg_list_on_enter(void* context) {
1919
view_dispatcher_switch_to_view(app->view_dispatcher, XRemoteViewIdStack);
2020

2121
xremote_sg_remote_load(app->sg_remote_buffer, app->file_path);
22-
//xremote_ir_remote_load(app->ir_remote_buffer, app->file_path);
2322
xremote_cross_remote_add_subghz(app->cross_remote, app->sg_remote_buffer);
2423
}
2524

2625
if(success) {
2726
//Load Remote Button View
28-
//scene_manager_next_scene(app->scene_manager, XRemoteSceneCreateAdd);
29-
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
3027
scene_manager_next_scene(app->scene_manager, XRemoteSceneCreate);
31-
//scene_manager_next_scene(app->scene_manager, XRemoteSceneIrRemote);
3228
} else {
3329
scene_manager_previous_scene(app->scene_manager);
3430
}

xremote_i.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,4 @@ typedef struct CrossRemote CrossRemote;
111111
typedef struct CrossRemoteItem CrossRemoteItem;
112112

113113
typedef struct XRemoteTransmit XRemoteTransmit;
114-
typedef struct XRemotePauseSet XRemotePauseSet;
115-
//typedef struct XRemoteInfoscreen XRemoteInfoscreen;
116-
117-
//typedef struct InfraredRemote InfraredRemote;
118-
//typedef struct InfraredRemoteButton InfraredRemoteButton;
119-
//typedef struct InfraredSignal InfraredSignal;
120-
//typedef struct InfraredRawSignal InfraredRawSignal;
114+
typedef struct XRemotePauseSet XRemotePauseSet;

0 commit comments

Comments
 (0)