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 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. #include "../common/dwin_color.h"
  38. #if ENABLED(LED_CONTROL_MENU)
  39. #include "../../../feature/leds/leds.h"
  40. #endif
  41. #define Def_Background_Color RGB( 1, 12, 8)
  42. #define Def_Cursor_color RGB(20, 49, 31)
  43. #define Def_TitleBg_color RGB( 0, 23, 16)
  44. #define Def_TitleTxt_color Color_White
  45. #define Def_Text_Color Color_White
  46. #define Def_Selected_Color Select_Color
  47. #define Def_SplitLine_Color RGB( 0, 23, 16)
  48. #define Def_Highlight_Color Color_White
  49. #define Def_StatusBg_Color RGB( 0, 23, 16)
  50. #define Def_StatusTxt_Color Color_Yellow
  51. #define Def_PopupBg_color Color_Bg_Window
  52. #define Def_PopupTxt_Color Popup_Text_Color
  53. #define Def_AlertBg_Color Color_Bg_Red
  54. #define Def_AlertTxt_Color Color_Yellow
  55. #define Def_PercentTxt_Color Percent_Color
  56. #define Def_Barfill_Color BarFill_Color
  57. #define Def_Indicator_Color Color_White
  58. #define Def_Coordinate_Color Color_White
  59. #define Def_Button_Color RGB( 0, 23, 16)
  60. #define HAS_ESDIAG 1
  61. #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
  62. #define Def_Leds_Color 0xFFFFFFFF
  63. #endif
  64. #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
  65. #define Def_CaseLight_Brightness 255
  66. #endif
  67. typedef struct {
  68. // Color settings
  69. uint16_t Background_Color = Def_Background_Color;
  70. uint16_t Cursor_color = Def_Cursor_color;
  71. uint16_t TitleBg_color = Def_TitleBg_color;
  72. uint16_t TitleTxt_color = Def_TitleTxt_color;
  73. uint16_t Text_Color = Def_Text_Color;
  74. uint16_t Selected_Color = Def_Selected_Color;
  75. uint16_t SplitLine_Color = Def_SplitLine_Color;
  76. uint16_t Highlight_Color = Def_Highlight_Color;
  77. uint16_t StatusBg_Color = Def_StatusBg_Color;
  78. uint16_t StatusTxt_Color = Def_StatusTxt_Color;
  79. uint16_t PopupBg_color = Def_PopupBg_color;
  80. uint16_t PopupTxt_Color = Def_PopupTxt_Color;
  81. uint16_t AlertBg_Color = Def_AlertBg_Color;
  82. uint16_t AlertTxt_Color = Def_AlertTxt_Color;
  83. uint16_t PercentTxt_Color = Def_PercentTxt_Color;
  84. uint16_t Barfill_Color = Def_Barfill_Color;
  85. uint16_t Indicator_Color = Def_Indicator_Color;
  86. uint16_t Coordinate_Color = Def_Coordinate_Color;
  87. // Temperatures
  88. #if HAS_HOTEND && defined(PREHEAT_1_TEMP_HOTEND)
  89. int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND;
  90. #endif
  91. #if HAS_HEATED_BED && defined(PREHEAT_1_TEMP_BED)
  92. int16_t BedPidT = PREHEAT_1_TEMP_BED;
  93. #endif
  94. #if HAS_HOTEND || HAS_HEATED_BED
  95. int16_t PidCycles = 10;
  96. #endif
  97. #if ENABLED(PREVENT_COLD_EXTRUSION)
  98. int16_t ExtMinT = EXTRUDE_MINTEMP;
  99. #endif
  100. #if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
  101. int16_t BedLevT = LEVELING_BED_TEMP;
  102. #endif
  103. #if ENABLED(BAUD_RATE_GCODE)
  104. bool Baud115K = false;
  105. #endif
  106. bool FullManualTramming = false;
  107. // Led
  108. #if ENABLED(MESH_BED_LEVELING)
  109. float ManualZOffset = 0;
  110. #endif
  111. #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
  112. uint32_t LED_Color = Def_Leds_Color;
  113. #endif
  114. } HMI_data_t;
  115. static constexpr size_t eeprom_data_size = sizeof(HMI_data_t);
  116. extern HMI_data_t HMI_data;