Просмотр исходного кода

Use submenu orientation function only in case of unleashed firmware

Sandro Kalatozishvili 2 лет назад
Родитель
Сommit
5e725be916
6 измененных файлов с 49 добавлено и 3 удалено
  1. 40 0
      docs/README.md
  2. BIN
      screens/horizontal/screen6.png
  3. BIN
      screens/horizontal/screen7.png
  4. BIN
      screens/horizontal/screen8.png
  5. 1 1
      xremote.h
  6. 8 2
      xremote_app.c

+ 40 - 0
docs/README.md

@@ -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
+

BIN
screens/horizontal/screen6.png


BIN
screens/horizontal/screen7.png


BIN
screens/horizontal/screen8.png


+ 1 - 1
xremote.h

@@ -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);

+ 8 - 2
xremote_app.c

@@ -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) {