dtmf_dolphin_scene_dialer.c 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #include "../dtmf_dolphin_i.h"
  2. // #include "../dtmf_dolphin_data.h"
  3. // #include "../dtmf_dolphin_audio.h"
  4. void dtmf_dolphin_scene_dialer_on_enter(void* context) {
  5. DTMFDolphinApp* app = context;
  6. DTMFDolphinScene scene_id = DTMFDolphinSceneDialer;
  7. enum DTMFDolphinSceneState state = scene_manager_get_scene_state(app->scene_manager, scene_id);
  8. switch(state) {
  9. case DTMFDolphinSceneStateBluebox:
  10. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_BLUEBOX);
  11. break;
  12. case DTMFDolphinSceneStateRedboxUS:
  13. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_US);
  14. break;
  15. case DTMFDolphinSceneStateRedboxUK:
  16. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK);
  17. break;
  18. case DTMFDolphinSceneStateRedboxCA:
  19. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_CA);
  20. break;
  21. case DTMFDolphinSceneStateMisc:
  22. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_MISC);
  23. break;
  24. default:
  25. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_DIALER);
  26. break;
  27. }
  28. view_dispatcher_switch_to_view(app->view_dispatcher, DTMFDolphinViewDialer);
  29. }
  30. bool dtmf_dolphin_scene_dialer_on_event(void* context, SceneManagerEvent event) {
  31. DTMFDolphinApp* app = context;
  32. UNUSED(app);
  33. UNUSED(event);
  34. bool consumed = false;
  35. // if(event.type == SceneManagerEventTypeTick) {
  36. // consumed = true;
  37. // }
  38. return consumed;
  39. }
  40. void dtmf_dolphin_scene_dialer_on_exit(void* context) {
  41. UNUSED(context);
  42. }