meal_pager_i.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #pragma once
  2. #include <furi.h>
  3. #include <furi_hal.h>
  4. #include <gui/gui.h>
  5. #include <input/input.h>
  6. #include <stdlib.h>
  7. #include <dialogs/dialogs.h>
  8. #include <notification/notification_messages.h>
  9. #include <gui/view_dispatcher.h>
  10. #include <gui/modules/submenu.h>
  11. #include <gui/scene_manager.h>
  12. #include <gui/modules/variable_item_list.h>
  13. #include <gui/modules/button_menu.h>
  14. #include <gui/modules/dialog_ex.h>
  15. #include "scenes/meal_pager_scene.h"
  16. #include "views/meal_pager_startscreen.h"
  17. #include "views/meal_pager_transmit.h"
  18. #include "helpers/meal_pager_storage.h"
  19. #include "helpers/subghz/subghz_types.h"
  20. #include "helpers/subghz/subghz.h"
  21. #define TAG "Meal_Pager"
  22. #define SUBGHZ_APP_EXTENSION ".sub"
  23. #define SUBGHZ_APP_FOLDER ANY_PATH("subghz")
  24. typedef struct Meal_PagerTransmit Meal_PagerTransmit;
  25. typedef struct SubGhz SubGhz;
  26. typedef struct {
  27. Gui* gui;
  28. NotificationApp* notification;
  29. SubGhzNotificationState state_notifications;
  30. ViewDispatcher* view_dispatcher;
  31. Submenu* submenu;
  32. SubGhz* subghz;
  33. SceneManager* scene_manager;
  34. VariableItemList* variable_item_list;
  35. Meal_PagerStartscreen* meal_pager_startscreen;
  36. Meal_PagerTransmit* meal_pager_transmit;
  37. DialogsApp* dialogs; // File Browser
  38. FuriString* file_path; // File Browser
  39. uint32_t haptic;
  40. uint32_t speaker;
  41. uint32_t led;
  42. uint32_t save_settings;
  43. uint32_t pager_type;
  44. uint32_t first_station;
  45. char* first_station_char;
  46. uint32_t last_station;
  47. char* last_station_char;
  48. uint32_t first_pager;
  49. char* first_pager_char;
  50. uint32_t last_pager;
  51. char* last_pager_char;
  52. uint32_t current_station;
  53. uint32_t current_pager;
  54. bool stop_transmit;
  55. } Meal_Pager;
  56. typedef enum {
  57. Meal_PagerViewIdStartscreen,
  58. Meal_PagerViewIdMenu,
  59. Meal_PagerViewIdTransmit,
  60. Meal_PagerViewIdSettings,
  61. } Meal_PagerViewId;
  62. typedef enum {
  63. Meal_PagerPagerTypeT119,
  64. Meal_PagerPagerTypeTD157,
  65. Meal_PagerPagerTypeTD165,
  66. Meal_PagerPagerTypeTD174,
  67. } Meal_PagerPagerType;
  68. typedef enum {
  69. Meal_PagerHapticOff,
  70. Meal_PagerHapticOn,
  71. } Meal_PagerHapticState;
  72. typedef enum {
  73. Meal_PagerSpeakerOff,
  74. Meal_PagerSpeakerOn,
  75. } Meal_PagerSpeakerState;
  76. typedef enum {
  77. Meal_PagerLedOff,
  78. Meal_PagerLedOn,
  79. } Meal_PagerLedState;
  80. typedef enum {
  81. Meal_PagerSettingsOff,
  82. Meal_PagerSettingsOn,
  83. } Meal_PagerSettingsStoreState;