Skip to content

Commit

Permalink
Code Updats for 0.103.1-rc
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lee committed Jun 17, 2024
1 parent 01eb2c1 commit bfecd49
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 15 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.5",
fap_version="2.6",
fap_category="Infrared",
fap_author="Leedave",
fap_description="One-Click, sends multiple commands",
Expand Down
3 changes: 3 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.6
- Fix for conflict wiht SubGHz folder variable in 0.103.1-rc

## 2.5
- Back button on info screen now reacts the same as ok button
- Fixed crash on exit in fw 0.100.3
Expand Down
5 changes: 0 additions & 5 deletions scenes/xremote_scene_ir_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ bool xremote_scene_ir_timer_on_event(void* context, SceneManagerEvent event) {
if(item->time > 9999) {
item->time = 9999;
}
//app->first_station = atoi(app->text_store[0]);
/*if(app->first_station > app->max_station) {
app->first_station = app->max_station;
snprintf(app->text_store[0], 5, "%lu", app->first_station);
}*/
scene_manager_previous_scene(app->scene_manager);
return true;
}
Expand Down
6 changes: 6 additions & 0 deletions scenes/xremote_scene_transmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ bool xremote_scene_transmit_on_event(void* context, SceneManagerEvent event) {
}
} else if(event.type == SceneManagerEventTypeTick) {
FURI_LOG_D(TAG, "Tick Event");
with_view_model(
xremote_transmit_get_view(app->xremote_transmit),
void* model,
{ UNUSED(model); },
true
);
if(app->state_notifications == SubGhzNotificationStateTx && app->led == 1) {
//blink for subghz
}
Expand Down
1 change: 0 additions & 1 deletion scenes/xremote_scene_xr_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ void xremote_scene_xr_list_on_enter(void* context) {

if(success) {
//Load Remote Button View
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
scene_manager_next_scene(app->scene_manager, XRemoteSceneTransmit);
} else {
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
Expand Down
2 changes: 0 additions & 2 deletions scenes/xremote_scene_xr_list_edit.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ void xremote_scene_xr_list_edit_on_enter(void* context) {

if(success) {
//Load Remote Button View
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
scene_manager_next_scene(app->scene_manager, XRemoteSceneXrListEditItem);
} else {
//scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
scene_manager_previous_scene(app->scene_manager);
}
}
Expand Down
23 changes: 23 additions & 0 deletions views/xremote_transmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,35 @@ void xremote_transmit_draw(Canvas* canvas, XRemoteTransmitModel* model) {
}
}

bool xremote_transmit_input(InputEvent* event, void* context) {
furi_assert(context);
XRemoteTransmit* instance = context;
if(event->type == InputTypeRelease) {
switch(event->key) {
case InputKeyBack:
with_view_model(
instance->view,
XRemoteTransmitModel * model,
{
UNUSED(model);
instance->callback(XRemoteCustomEventViewTransmitterSendStop, instance->context);
},
true);
break;
default:
break;
}
}
return true;
}

XRemoteTransmit* xremote_transmit_alloc() {
XRemoteTransmit* instance = malloc(sizeof(XRemoteTransmit));
instance->view = view_alloc();
view_allocate_model(instance->view, ViewModelTypeLocking, sizeof(XRemoteTransmitModel));
view_set_context(instance->view, instance);
view_set_draw_callback(instance->view, (ViewDrawCallback)xremote_transmit_draw);
view_set_input_callback(instance->view, xremote_transmit_input);
view_set_enter_callback(instance->view, xremote_transmit_enter);

with_view_model(
Expand Down
4 changes: 3 additions & 1 deletion views/xremote_transmit.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ void xremote_transmit_free(XRemoteTransmit* instance);

View* xremote_transmit_get_view(XRemoteTransmit* instance);

void xremote_transmit_enter(void* context);
void xremote_transmit_enter(void* context);

bool xremote_transmit_input(InputEvent* event, void* context);
6 changes: 1 addition & 5 deletions xremote_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
#include <gui/modules/button_menu.h>
#include <gui/modules/button_panel.h>
#include <gui/modules/variable_item_list.h>

//#include <lib/subghz/protocols/protocol_items.h> //Not found

#include <input/input.h>
#include <notification/notification_messages.h>

Expand Down Expand Up @@ -53,13 +50,12 @@
#define XREMOTE_TEXT_STORE_SIZE 128
#define XREMOTE_MAX_ITEM_NAME_LENGTH 22
#define XREMOTE_MAX_REMOTE_NAME_LENGTH 22
#define XREMOTE_VERSION "2.5"
#define XREMOTE_VERSION "2.6"

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

#define SUBGHZ_APP_EXTENSION ".sub"
#define SUBGHZ_APP_FOLDER ANY_PATH("subghz")

#define TAG "XRemote"

Expand Down

0 comments on commit bfecd49

Please sign in to comment.