My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

screen_data.h 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /*****************
  2. * screen_data.h *
  3. *****************/
  4. /****************************************************************************
  5. * Written By Mark Pelletier 2017 - Aleph Objects, Inc. *
  6. * Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
  7. * *
  8. * This program is free software: you can redistribute it and/or modify *
  9. * it under the terms of the GNU General Public License as published by *
  10. * the Free Software Foundation, either version 3 of the License, or *
  11. * (at your option) any later version. *
  12. * *
  13. * This program is distributed in the hope that it will be useful, *
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  16. * GNU General Public License for more details. *
  17. * *
  18. * To view a copy of the GNU General Public License, go to the following *
  19. * location: <https://www.gnu.org/licenses/>. *
  20. ****************************************************************************/
  21. #pragma once
  22. #include "../ftdi_eve_lib/ftdi_eve_lib.h"
  23. // To save RAM, store state information related to a particular screen
  24. // in a union. The values should be initialized in the onEntry method.
  25. struct base_numeric_adjustment_t {uint8_t increment;};
  26. union screen_data_t {
  27. struct base_numeric_adjustment_t BaseNumericAdjustmentScreen;
  28. struct {uint8_t volume; uint8_t brightness;} InterfaceSettingsScreen;
  29. struct {char passcode[5];} LockScreen;
  30. struct {bool isError;} AlertDialogBox;
  31. struct {bool auto_hide;} SpinnerDialogBox;
  32. struct {uint8_t file_index;} ConfirmStartPrintDialogBox;
  33. struct {
  34. uint8_t e_tag, t_tag, repeat_tag;
  35. ExtUI::extruder_t saved_extruder;
  36. #if FILAMENT_UNLOAD_PURGE_LENGTH > 0
  37. bool need_purge;
  38. #endif
  39. } ChangeFilamentScreen;
  40. struct {
  41. struct {
  42. uint8_t is_dir : 1;
  43. uint8_t is_root : 1;
  44. } flags;
  45. uint8_t selected_tag;
  46. uint8_t num_page;
  47. uint8_t cur_page;
  48. #if ENABLED(SCROLL_LONG_FILENAMES) && (FTDI_API_LEVEL >= 810)
  49. uint16_t scroll_pos;
  50. uint16_t scroll_max;
  51. #endif
  52. } FilesScreen;
  53. struct {
  54. struct base_numeric_adjustment_t placeholder;
  55. float e_rel[ExtUI::extruderCount];
  56. } MoveAxisScreen;
  57. #if HAS_MESH
  58. struct {
  59. bool showMappingDone;
  60. uint8_t count;
  61. uint8_t highlightedTag;
  62. } BedMeshScreen;
  63. #endif
  64. #if ENABLED(TOUCH_UI_DEVELOPER_MENU)
  65. struct {
  66. uint32_t next_watchdog_trigger;
  67. const char* message;
  68. } StressTestScreen;
  69. #endif
  70. #if ENABLED(TOUCH_UI_COCOA_PRESS)
  71. struct {
  72. uint32_t start_ms;
  73. } PreheatTimerScreen;
  74. #endif
  75. #if ENABLED(BABYSTEPPING)
  76. struct {
  77. struct base_numeric_adjustment_t placeholder;
  78. xyz_int_t rel;
  79. #if EXTRUDERS > 1
  80. bool link_nozzles;
  81. #endif
  82. bool show_offsets;
  83. } NudgeNozzleScreen;
  84. #endif
  85. };
  86. extern screen_data_t screen_data;