Skip to content

Commit

Permalink
fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
iomonad committed Oct 23, 2023
1 parent 36a8059 commit 4eacd2d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions canutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@ static void canutils_context_free(Application *app) {
int32_t canutils_app(void* p) {
UNUSED(p);

FURI_LOG_I(TAG, "context setup");
Application *app = canutils_context_setup();
Gui *gui = furi_record_open(RECORD_GUI);

FURI_LOG_I(TAG, "dispatcher setup");
view_dispatcher_attach_to_gui(app->view_dispatcher, gui, ViewDispatcherTypeFullscreen);

FURI_LOG_I(TAG, "scene manager next scene");
scene_manager_next_scene(app->scene_manager, ViewScene_Menu);
FURI_LOG_I(TAG, "run view dispatcher");
view_dispatcher_run(app->view_dispatcher);

FURI_LOG_I(TAG, "context cleanup");
Expand Down
18 changes: 18 additions & 0 deletions events.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,40 @@ bool canutils_scene_on_event_main_menu(void *context, SceneManagerEvent event) {
case SceneManagerEventTypeCustom: {
switch (event.event) {
case Event_CanDump:
scene_manager_next_scene(app->scene_manager, ViewScene_CanDump);
is_consumed = true;
break;
case Event_CanPlayer:
scene_manager_next_scene(app->scene_manager, ViewScene_CanPlayer);
is_consumed = true;
break;
case Event_CanSend:
scene_manager_next_scene(app->scene_manager, ViewScene_CanSend);
is_consumed = true;
break;
case Event_CanGen:
scene_manager_next_scene(app->scene_manager, ViewScene_CanGen);
is_consumed = true;
break;
case Event_CanSequence:
scene_manager_next_scene(app->scene_manager, ViewScene_CanSequence);
is_consumed = true;
break;
case Event_CanSniffer:
scene_manager_next_scene(app->scene_manager, ViewScene_CanSniffer);
is_consumed = true;
break;
case Event_CanBusLoad:
scene_manager_next_scene(app->scene_manager, ViewScene_CanBusLoad);
is_consumed = true;
break;
case Event_CanCalcBitTiming:
scene_manager_next_scene(app->scene_manager, ViewScene_CanCalcBitTiming);
is_consumed = true;
break;
case Event_CanFdTest:
scene_manager_next_scene(app->scene_manager, ViewScene_CanDump);
is_consumed = true;
break;
}
break;
Expand Down

0 comments on commit 4eacd2d

Please sign in to comment.