|
@@ -16,7 +16,6 @@ static void xremote_create_callback(void* context, int32_t index, InputType type
|
|
|
} else if(type == InputTypeRelease) {
|
|
} else if(type == InputTypeRelease) {
|
|
|
custom_type = XRemoteCustomEventMenuVoid;
|
|
custom_type = XRemoteCustomEventMenuVoid;
|
|
|
} else if(type == InputTypeShort) {
|
|
} else if(type == InputTypeShort) {
|
|
|
- //somehow ButtonMenuItemTypeCommon uses InputTypeShort
|
|
|
|
|
custom_type = XRemoteCustomEventMenuSelected;
|
|
custom_type = XRemoteCustomEventMenuSelected;
|
|
|
} else {
|
|
} else {
|
|
|
furi_crash("Unexpected Input Type");
|
|
furi_crash("Unexpected Input Type");
|
|
@@ -30,7 +29,6 @@ void xremote_scene_create_on_enter(void* context) {
|
|
|
furi_assert(context);
|
|
furi_assert(context);
|
|
|
XRemote* app = context;
|
|
XRemote* app = context;
|
|
|
ButtonMenu* button_menu = app->button_menu_create;
|
|
ButtonMenu* button_menu = app->button_menu_create;
|
|
|
- //SceneManager* scene_manager = app->scene_manager;
|
|
|
|
|
|
|
|
|
|
size_t item_count = xremote_cross_remote_get_item_count(app->cross_remote);
|
|
size_t item_count = xremote_cross_remote_get_item_count(app->cross_remote);
|
|
|
for(size_t i = 0; i < item_count; ++i) {
|
|
for(size_t i = 0; i < item_count; ++i) {
|
|
@@ -76,13 +74,6 @@ bool xremote_scene_create_on_event(void* context, SceneManagerEvent event) {
|
|
|
if(event.type == SceneManagerEventTypeBack) {
|
|
if(event.type == SceneManagerEventTypeBack) {
|
|
|
scene_manager_next_scene(app->scene_manager, XRemoteSceneMenu);
|
|
scene_manager_next_scene(app->scene_manager, XRemoteSceneMenu);
|
|
|
consumed = true;
|
|
consumed = true;
|
|
|
- /*if(is_transmitter_idle) {
|
|
|
|
|
- const uint32_t possible_scenes[] = {InfraredSceneRemoteList, InfraredSceneStart};
|
|
|
|
|
- consumed = scene_manager_search_and_switch_to_previous_scene_one_of(
|
|
|
|
|
- scene_manager, possible_scenes, COUNT_OF(possible_scenes));
|
|
|
|
|
- } else {
|
|
|
|
|
- consumed = true;
|
|
|
|
|
- }*/
|
|
|
|
|
} else if(event.type == SceneManagerEventTypeCustom) {
|
|
} else if(event.type == SceneManagerEventTypeCustom) {
|
|
|
const uint16_t custom_type = xremote_custom_menu_event_get_type(event.event);
|
|
const uint16_t custom_type = xremote_custom_menu_event_get_type(event.event);
|
|
|
const int16_t button_index = xremote_custom_menu_event_get_value(event.event);
|
|
const int16_t button_index = xremote_custom_menu_event_get_value(event.event);
|
|
@@ -101,25 +92,6 @@ bool xremote_scene_create_on_event(void* context, SceneManagerEvent event) {
|
|
|
app->edit_item = button_index;
|
|
app->edit_item = button_index;
|
|
|
scene_manager_next_scene(app->scene_manager, XRemoteSceneEditItem);
|
|
scene_manager_next_scene(app->scene_manager, XRemoteSceneEditItem);
|
|
|
}
|
|
}
|
|
|
- /*switch(event.event) {
|
|
|
|
|
- case XRemoteCustomEventCreateLeft:
|
|
|
|
|
- case XRemoteCustomEventCreateRight:
|
|
|
|
|
- break;
|
|
|
|
|
- case XRemoteCustomEventCreateUp:
|
|
|
|
|
- case XRemoteCustomEventCreateDown:
|
|
|
|
|
- break;
|
|
|
|
|
- case XRemoteCustomEventCreateBack:
|
|
|
|
|
- notification_message(app->notification, &sequence_reset_red);
|
|
|
|
|
- notification_message(app->notification, &sequence_reset_green);
|
|
|
|
|
- notification_message(app->notification, &sequence_reset_blue);
|
|
|
|
|
- if(!scene_manager_search_and_switch_to_previous_scene(
|
|
|
|
|
- app->scene_manager, XRemoteSceneMenu)) {
|
|
|
|
|
- scene_manager_stop(app->scene_manager);
|
|
|
|
|
- view_dispatcher_stop(app->view_dispatcher);
|
|
|
|
|
- }
|
|
|
|
|
- consumed = true;
|
|
|
|
|
- break;
|
|
|
|
|
- }*/
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return consumed;
|
|
return consumed;
|