|
@@ -53,6 +53,7 @@ XRemote* xremote_app_alloc() {
|
|
|
app->stop_transmit = false;
|
|
app->stop_transmit = false;
|
|
|
app->loop_transmit = 0;
|
|
app->loop_transmit = 0;
|
|
|
app->transmit_item = 0;
|
|
app->transmit_item = 0;
|
|
|
|
|
+ app->loadFavorite = false;
|
|
|
|
|
|
|
|
// Load configs
|
|
// Load configs
|
|
|
xremote_read_settings(app);
|
|
xremote_read_settings(app);
|
|
@@ -220,15 +221,10 @@ static void xremote_ir_load_settings(XRemote* app) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int32_t xremote_app(void* p) {
|
|
int32_t xremote_app(void* p) {
|
|
|
- UNUSED(p);
|
|
|
|
|
XRemote* app = xremote_app_alloc();
|
|
XRemote* app = xremote_app_alloc();
|
|
|
|
|
|
|
|
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
|
|
view_dispatcher_attach_to_gui(app->view_dispatcher, app->gui, ViewDispatcherTypeFullscreen);
|
|
|
|
|
|
|
|
- //scene_manager_next_scene(app->scene_manager, XRemoteSceneInfoscreen); //Start with start screen
|
|
|
|
|
- scene_manager_next_scene(
|
|
|
|
|
- app->scene_manager, XRemoteSceneMenu); //if you want to directly start with Menu
|
|
|
|
|
-
|
|
|
|
|
furi_hal_power_suppress_charge_enter();
|
|
furi_hal_power_suppress_charge_enter();
|
|
|
xremote_ir_load_settings(app);
|
|
xremote_ir_load_settings(app);
|
|
|
|
|
|
|
@@ -237,6 +233,19 @@ int32_t xremote_app(void* p) {
|
|
|
storage_common_mkdir(storage, XREMOTE_APP_FOLDER);
|
|
storage_common_mkdir(storage, XREMOTE_APP_FOLDER);
|
|
|
furi_record_close(RECORD_STORAGE);
|
|
furi_record_close(RECORD_STORAGE);
|
|
|
|
|
|
|
|
|
|
+ //bool loadFavorite = false;
|
|
|
|
|
+ if(p && strlen(p)) {
|
|
|
|
|
+ furi_string_set_str(app->file_path, p);
|
|
|
|
|
+ app->loadFavorite = xremote_cross_remote_load(app->cross_remote, app->file_path);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (app->loadFavorite) {
|
|
|
|
|
+ scene_manager_next_scene(
|
|
|
|
|
+ app->scene_manager, XRemoteSceneTransmit); //if you loaded from Favorites
|
|
|
|
|
+ } else {
|
|
|
|
|
+ scene_manager_next_scene(
|
|
|
|
|
+ app->scene_manager, XRemoteSceneMenu); //if you want to directly start with Menu
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
view_dispatcher_run(app->view_dispatcher);
|
|
view_dispatcher_run(app->view_dispatcher);
|
|
|
|
|
|
|
|
xremote_save_settings(app);
|
|
xremote_save_settings(app);
|