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.

dwin_defines.h 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  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. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * DWIN general defines and data structs for PRO UI
  25. * Author: Miguel A. Risco-Castillo (MRISCOC)
  26. * Version: 3.11.2
  27. * Date: 2022/02/28
  28. */
  29. //#define DEBUG_DWIN 1
  30. //#define NEED_HEX_PRINT 1
  31. #include "../../../inc/MarlinConfigPre.h"
  32. #include <stddef.h>
  33. #define HAS_ESDIAG 1
  34. #if defined(__STM32F1__) || defined(STM32F1)
  35. #define DASH_REDRAW 1
  36. #endif
  37. #if DISABLED(LIMITED_MAX_FR_EDITING)
  38. #error "LIMITED_MAX_FR_EDITING is required with ProUI."
  39. #endif
  40. #if DISABLED(LIMITED_MAX_ACCEL_EDITING)
  41. #error "LIMITED_MAX_ACCEL_EDITING is required with ProUI."
  42. #endif
  43. #if ENABLED(CLASSIC_JERK) && DISABLED(LIMITED_JERK_EDITING)
  44. #error "LIMITED_JERK_EDITING is required with ProUI."
  45. #endif
  46. #if DISABLED(FILAMENT_RUNOUT_SENSOR)
  47. #error "FILAMENT_RUNOUT_SENSOR is required with ProUI."
  48. #endif
  49. #if DISABLED(INDIVIDUAL_AXIS_HOMING_SUBMENU)
  50. #error "INDIVIDUAL_AXIS_HOMING_SUBMENU is required with ProUI."
  51. #endif
  52. #if DISABLED(LCD_SET_PROGRESS_MANUALLY)
  53. #error "LCD_SET_PROGRESS_MANUALLY is required with ProUI."
  54. #endif
  55. #if DISABLED(STATUS_MESSAGE_SCROLLING)
  56. #error "STATUS_MESSAGE_SCROLLING is required with ProUI."
  57. #endif
  58. #if DISABLED(BAUD_RATE_GCODE)
  59. #error "BAUD_RATE_GCODE is required with ProUI."
  60. #endif
  61. #if DISABLED(SOUND_MENU_ITEM)
  62. #error "SOUND_MENU_ITEM is required with ProUI."
  63. #endif
  64. #if DISABLED(PRINTCOUNTER)
  65. #error "PRINTCOUNTER is required with ProUI."
  66. #endif
  67. #include "../common/dwin_color.h"
  68. #if ENABLED(LED_CONTROL_MENU)
  69. #include "../../../feature/leds/leds.h"
  70. #endif
  71. #define Def_Background_Color RGB( 1, 12, 8)
  72. #define Def_Cursor_color RGB(20, 49, 31)
  73. #define Def_TitleBg_color RGB( 0, 23, 16)
  74. #define Def_TitleTxt_color Color_White
  75. #define Def_Text_Color Color_White
  76. #define Def_Selected_Color Select_Color
  77. #define Def_SplitLine_Color RGB( 0, 23, 16)
  78. #define Def_Highlight_Color Color_White
  79. #define Def_StatusBg_Color RGB( 0, 23, 16)
  80. #define Def_StatusTxt_Color Color_Yellow
  81. #define Def_PopupBg_color Color_Bg_Window
  82. #define Def_PopupTxt_Color Popup_Text_Color
  83. #define Def_AlertBg_Color Color_Bg_Red
  84. #define Def_AlertTxt_Color Color_Yellow
  85. #define Def_PercentTxt_Color Percent_Color
  86. #define Def_Barfill_Color BarFill_Color
  87. #define Def_Indicator_Color Color_White
  88. #define Def_Coordinate_Color Color_White
  89. #define Def_Button_Color RGB( 0, 23, 16)
  90. #define HAS_ESDIAG 1
  91. #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
  92. #define Def_Leds_Color 0xFFFFFFFF
  93. #endif
  94. #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
  95. #define Def_CaseLight_Brightness 255
  96. #endif
  97. typedef struct {
  98. // Color settings
  99. uint16_t Background_Color = Def_Background_Color;
  100. uint16_t Cursor_color = Def_Cursor_color;
  101. uint16_t TitleBg_color = Def_TitleBg_color;
  102. uint16_t TitleTxt_color = Def_TitleTxt_color;
  103. uint16_t Text_Color = Def_Text_Color;
  104. uint16_t Selected_Color = Def_Selected_Color;
  105. uint16_t SplitLine_Color = Def_SplitLine_Color;
  106. uint16_t Highlight_Color = Def_Highlight_Color;
  107. uint16_t StatusBg_Color = Def_StatusBg_Color;
  108. uint16_t StatusTxt_Color = Def_StatusTxt_Color;
  109. uint16_t PopupBg_color = Def_PopupBg_color;
  110. uint16_t PopupTxt_Color = Def_PopupTxt_Color;
  111. uint16_t AlertBg_Color = Def_AlertBg_Color;
  112. uint16_t AlertTxt_Color = Def_AlertTxt_Color;
  113. uint16_t PercentTxt_Color = Def_PercentTxt_Color;
  114. uint16_t Barfill_Color = Def_Barfill_Color;
  115. uint16_t Indicator_Color = Def_Indicator_Color;
  116. uint16_t Coordinate_Color = Def_Coordinate_Color;
  117. // Temperatures
  118. #if HAS_HOTEND && defined(PREHEAT_1_TEMP_HOTEND)
  119. int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND;
  120. #endif
  121. #if HAS_HEATED_BED && defined(PREHEAT_1_TEMP_BED)
  122. int16_t BedPidT = PREHEAT_1_TEMP_BED;
  123. #endif
  124. #if HAS_HOTEND || HAS_HEATED_BED
  125. int16_t PidCycles = 10;
  126. #endif
  127. #if ENABLED(PREVENT_COLD_EXTRUSION)
  128. int16_t ExtMinT = EXTRUDE_MINTEMP;
  129. #endif
  130. #if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
  131. int16_t BedLevT = LEVELING_BED_TEMP;
  132. #endif
  133. #if ENABLED(BAUD_RATE_GCODE)
  134. bool Baud115K = false;
  135. #endif
  136. bool FullManualTramming = false;
  137. // Led
  138. #if ENABLED(MESH_BED_LEVELING)
  139. float ManualZOffset = 0;
  140. #endif
  141. #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
  142. uint32_t LED_Color = Def_Leds_Color;
  143. #endif
  144. } HMI_data_t;
  145. static constexpr size_t eeprom_data_size = sizeof(HMI_data_t);
  146. extern HMI_data_t HMI_data;