meal_pager_i.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 MEAL_PAGER_VERSION "1.8"
  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. uint32_t repeats;
  56. char* repeats_char;
  57. IntInput* int_input;
  58. char* text_buffer;
  59. uint32_t max_station;
  60. uint32_t max_pager;
  61. char text_store[6][36];
  62. } Meal_Pager;
  63. typedef enum {
  64. Meal_PagerViewIdStartscreen,
  65. Meal_PagerViewIdMenu,
  66. Meal_PagerViewIdTransmit,
  67. Meal_PagerViewIdSettings,
  68. Meal_PagerViewIdIntInput,
  69. } Meal_PagerViewId;
  70. typedef enum {
  71. Meal_PagerPagerTypeT119,
  72. Meal_PagerPagerTypeTD157,
  73. Meal_PagerPagerTypeTD165,
  74. Meal_PagerPagerTypeTD174,
  75. } Meal_PagerPagerType;
  76. typedef enum {
  77. Meal_PagerHapticOff,
  78. Meal_PagerHapticOn,
  79. } Meal_PagerHapticState;
  80. typedef enum {
  81. Meal_PagerSpeakerOff,
  82. Meal_PagerSpeakerOn,
  83. } Meal_PagerSpeakerState;
  84. typedef enum {
  85. Meal_PagerLedOff,
  86. Meal_PagerLedOn,
  87. } Meal_PagerLedState;
  88. typedef enum {
  89. Meal_PagerSettingsOff,
  90. Meal_PagerSettingsOn,
  91. } Meal_PagerSettingsStoreState;