meal_pager_i.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. #include "helpers/gui/int_input.h"
  22. #define TAG "Meal_Pager"
  23. #define SUBGHZ_APP_EXTENSION ".sub"
  24. #define SUBGHZ_APP_FOLDER ANY_PATH("subghz")
  25. typedef struct Meal_PagerTransmit Meal_PagerTransmit;
  26. typedef struct SubGhz SubGhz;
  27. typedef struct {
  28. Gui* gui;
  29. NotificationApp* notification;
  30. SubGhzNotificationState state_notifications;
  31. ViewDispatcher* view_dispatcher;
  32. Submenu* submenu;
  33. SubGhz* subghz;
  34. SceneManager* scene_manager;
  35. VariableItemList* variable_item_list;
  36. Meal_PagerStartscreen* meal_pager_startscreen;
  37. Meal_PagerTransmit* meal_pager_transmit;
  38. DialogsApp* dialogs; // File Browser
  39. FuriString* file_path; // File Browser
  40. uint32_t haptic;
  41. uint32_t speaker;
  42. uint32_t led;
  43. uint32_t save_settings;
  44. uint32_t pager_type;
  45. uint32_t first_station;
  46. char* first_station_char;
  47. uint32_t last_station;
  48. char* last_station_char;
  49. uint32_t first_pager;
  50. char* first_pager_char;
  51. uint32_t last_pager;
  52. char* last_pager_char;
  53. uint32_t current_station;
  54. uint32_t current_pager;
  55. bool stop_transmit;
  56. uint32_t repeats;
  57. char* repeats_char;
  58. IntInput* int_input;
  59. char* text_buffer;
  60. uint32_t max_station;
  61. uint32_t max_pager;
  62. char text_store[6][36];
  63. } Meal_Pager;
  64. typedef enum {
  65. Meal_PagerViewIdStartscreen,
  66. Meal_PagerViewIdMenu,
  67. Meal_PagerViewIdTransmit,
  68. Meal_PagerViewIdSettings,
  69. Meal_PagerViewIdIntInput,
  70. } Meal_PagerViewId;
  71. typedef enum {
  72. Meal_PagerPagerTypeT119,
  73. Meal_PagerPagerTypeTD157,
  74. Meal_PagerPagerTypeTD165,
  75. Meal_PagerPagerTypeTD174,
  76. } Meal_PagerPagerType;
  77. typedef enum {
  78. Meal_PagerHapticOff,
  79. Meal_PagerHapticOn,
  80. } Meal_PagerHapticState;
  81. typedef enum {
  82. Meal_PagerSpeakerOff,
  83. Meal_PagerSpeakerOn,
  84. } Meal_PagerSpeakerState;
  85. typedef enum {
  86. Meal_PagerLedOff,
  87. Meal_PagerLedOn,
  88. } Meal_PagerLedState;
  89. typedef enum {
  90. Meal_PagerSettingsOff,
  91. Meal_PagerSettingsOn,
  92. } Meal_PagerSettingsStoreState;