Skip to content

Commit

Permalink
Merge pull request #16 from leedave/feature/fix_0.100.3
Browse files Browse the repository at this point in the history
Fix for crash on exit in 0.100.3
  • Loading branch information
leedave authored Apr 5, 2024
2 parents 4d4962f + 642afe4 commit 01eb2c1
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion application.fam
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ App(
stack_size=3 * 1024,
fap_icon="icons/xremote_10px.png",
fap_icon_assets="icons",
fap_version="2.4",
fap_version="2.5",
fap_category="Infrared",
fap_author="Leedave",
fap_description="One-Click, sends multiple commands",
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.5
- Back button on info screen now reacts the same as ok button
- Fixed crash on exit in fw 0.100.3

## 2.4
- Added support for encoded SubGhz files
- Added timer for SubGhz transmission (not needed in RAW files)
Expand Down
15 changes: 1 addition & 14 deletions views/xremote_infoscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,6 @@ bool xremote_infoscreen_input(InputEvent* event, void* context) {
if(event->type == InputTypeRelease) {
switch(event->key) {
case InputKeyBack:
with_view_model(
instance->view,
XRemoteInfoscreenModel * model,
{
UNUSED(model);
instance->callback(XRemoteCustomEventInfoscreenBack, instance->context);
},
true);
break;
case InputKeyLeft:
case InputKeyRight:
case InputKeyUp:
case InputKeyDown:
case InputKeyOk:
with_view_model(
instance->view,
Expand All @@ -70,7 +57,7 @@ bool xremote_infoscreen_input(InputEvent* event, void* context) {
},
true);
break;
case InputKeyMAX:
default:
break;
}
}
Expand Down
9 changes: 9 additions & 0 deletions views/xremote_pause_set.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,13 @@ void xremote_pause_set_enter(void* context) {
View* xremote_pause_set_get_view(XRemotePauseSet* instance) {
furi_assert(instance);
return instance->view;
}

void xremote_pause_set_free(XRemotePauseSet* instance) {
furi_assert(instance);

with_view_model(
instance->view, XRemotePauseSetModel * model, { UNUSED(model); }, true);
view_free(instance->view);
free(instance);
}
1 change: 1 addition & 0 deletions views/xremote_pause_set.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ void xremote_pause_set_set_callback(
void* context);

XRemotePauseSet* xremote_pause_set_alloc();
void xremote_pause_set_free(XRemotePauseSet* instance);

void xremote_pause_set_enter(void* context);

Expand Down
7 changes: 7 additions & 0 deletions xremote.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,18 @@ void xremote_app_free(XRemote* app) {

// View Dispatcher
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdMenu);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdEditItem);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdInfoscreen);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdCreate);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdCreateAdd);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdSettings);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdWip);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdStack);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdTextInput);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdIntInput);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdTransmit);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdPauseSet);
view_dispatcher_remove_view(app->view_dispatcher, XRemoteViewIdIrRemote);
text_input_free(app->text_input);
int_input_free(app->int_input);
button_menu_free(app->button_menu_create);
Expand All @@ -156,6 +160,9 @@ void xremote_app_free(XRemote* app) {
view_stack_free(app->view_stack);
popup_free(app->popup);
submenu_free(app->submenu);
xremote_infoscreen_free(app->xremote_infoscreen);
xremote_pause_set_free(app->xremote_pause_set);
xremote_transmit_free(app->xremote_transmit);

view_dispatcher_free(app->view_dispatcher);
furi_record_close(RECORD_GUI);
Expand Down
2 changes: 1 addition & 1 deletion xremote_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
#define XREMOTE_TEXT_STORE_SIZE 128
#define XREMOTE_MAX_ITEM_NAME_LENGTH 22
#define XREMOTE_MAX_REMOTE_NAME_LENGTH 22
#define XREMOTE_VERSION "2.4"
#define XREMOTE_VERSION "2.5"

#define INFRARED_APP_EXTENSION ".ir"
#define INFRARED_APP_FOLDER ANY_PATH("infrared")
Expand Down

0 comments on commit 01eb2c1

Please sign in to comment.