Skip to content

Commit

Permalink
Use submenu orientation function only in case of unleashed firmware
Browse files Browse the repository at this point in the history
  • Loading branch information
kala13x committed Oct 7, 2023
1 parent 3826cb3 commit 5e725be
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 3 deletions.
40 changes: 40 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## flipper-xremote
Advanced IR Remote App for Flipper Device

## About
Navigation to the menu to press each button individually can be often uncomfortable because it requires scrolling to the desired button and selecting it. The idea behind XRemote is that all physical buttons are pre-mapped to specific category buttons, and a physical button directly sends an infrared signal. This allows the flipper device to be used as a remote rather than as a tool that has a remote.

XRemote also introduces a more user-friendly learning approach. Instead of having to manually name each button on the flipper when cloning a remote, the learning tool informs you upfront which buttons it will record. All you need to do is press the corresponding button on your existing remote, eliminating the need to name them individually.

The application is compatible with standard .ir files. However, to ensure functionality, names within these files must align with the predefined naming scheme. If the button is not highlighted when pressed or the notification LED does not light up, the button with the appropriate name cannot be found in the file.

## Button schema
Button name | Description
------------|-------------------
Power | Power
Setup | Setup/Settings
Input | Input/Source
Menu | Menu
List | List
Info | Info
Mode | Mode
Back | Back
Ok | Enter/Ok
Up | Up
Down | Down
Left | Left
Right | Right
Mute | Mute
Vol_up | Volume up
Vol_dn | Volume down
Ch_next | Next channel
Ch_prev | Previous channel
Next | Jump forward
Prev | Jump backward
Fast_fo | Fast forward
Fast_ba | Fast backward
Play_pa | Play/Pause
Pause | Pause
Play | Play
Stop | Stop

Binary file added screens/horizontal/screen6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screens/horizontal/screen7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screens/horizontal/screen8.png
Binary file not shown.
2 changes: 1 addition & 1 deletion xremote.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

#define XREMOTE_VERSION_MAJOR 1
#define XREMOTE_VERSION_MINOR 0
#define XREMOTE_BUILD_NUMBER 1
#define XREMOTE_BUILD_NUMBER 2

void xremote_get_version(char* version, size_t length);
10 changes: 8 additions & 2 deletions xremote_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,17 @@ void xremote_app_submenu_alloc(XRemoteApp* app, uint32_t index, ViewNavigationCa
app->submenu_id = index;

XRemoteAppSettings* settings = app->app_ctx->app_settings;
View* view = submenu_get_view(app->submenu);
view_set_previous_callback(view, prev_cb);

#ifdef FW_ORIGIN_Unleashed
submenu_set_orientation(app->submenu, settings->orientation);
view_set_previous_callback(submenu_get_view(app->submenu), prev_cb);
#else
view_set_orientation(view, settings->orientation);
#endif

ViewDispatcher* view_disp = app->app_ctx->view_dispatcher;
view_dispatcher_add_view(view_disp, app->submenu_id, submenu_get_view(app->submenu));
view_dispatcher_add_view(view_disp, app->submenu_id, view);
}

void xremote_app_submenu_free(XRemoteApp* app) {
Expand Down

0 comments on commit 5e725be

Please sign in to comment.