meal_pager_i.h 2.6 KB

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