evil_portal_app_i.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #pragma once
  2. #include "evil_portal_app.h"
  3. #include "evil_portal_custom_event.h"
  4. #include "evil_portal_uart.h"
  5. #include "scenes/evil_portal_scene.h"
  6. #include <gui/gui.h>
  7. #include <gui/modules/text_box.h>
  8. #include <gui/modules/variable_item_list.h>
  9. #include <gui/scene_manager.h>
  10. #include <gui/view_dispatcher.h>
  11. #define NUM_MENU_ITEMS (4)
  12. #define EVIL_PORTAL_TEXT_BOX_STORE_SIZE (4096)
  13. #define UART_CH (FuriHalUartIdUSART1)
  14. struct Evil_PortalApp {
  15. Gui *gui;
  16. ViewDispatcher *view_dispatcher;
  17. SceneManager *scene_manager;
  18. char* portal_logs;
  19. FuriString *text_box_store;
  20. size_t text_box_store_strlen;
  21. TextBox *text_box;
  22. VariableItemList *var_item_list;
  23. Evil_PortalUart *uart;
  24. int selected_menu_index;
  25. int selected_option_index[NUM_MENU_ITEMS];
  26. const char *selected_tx_string;
  27. const char *command_queue[1];
  28. int command_index;
  29. bool has_command_queue;
  30. bool is_command;
  31. bool is_custom_tx_string;
  32. bool focus_console_start;
  33. bool show_stopscan_tip;
  34. bool sent_ap;
  35. bool sent_html;
  36. int BAUDRATE;
  37. int TERMINAL_MODE; // 1=AT mode, 0=other mode
  38. uint8_t *index_html;
  39. uint8_t *ap_name;
  40. };
  41. typedef enum {
  42. Evil_PortalAppViewVarItemList,
  43. Evil_PortalAppViewConsoleOutput,
  44. Evil_PortalAppViewStartPortal,
  45. } Evil_PortalAppView;