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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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
  25. * Author: Miguel A. Risco-Castillo (MRISCOC)
  26. * Version: 3.9.2
  27. * Date: 2021/11/21
  28. *
  29. * Based on the original code provided by Creality under GPL
  30. */
  31. //#define NEED_HEX_PRINT 1
  32. //#define DEBUG_DWIN 1
  33. #include "../../../core/types.h"
  34. #include "../common/dwin_color.h"
  35. #if ENABLED(LED_CONTROL_MENU)
  36. #include "../../../feature/leds/leds.h"
  37. #endif
  38. #define Def_Background_Color RGB( 1, 12, 8)
  39. #define Def_Cursor_color RGB(20, 49, 31)
  40. #define Def_TitleBg_color RGB( 0, 23, 16)
  41. #define Def_TitleTxt_color Color_White
  42. #define Def_Text_Color Color_White
  43. #define Def_Selected_Color Select_Color
  44. #define Def_SplitLine_Color RGB( 0, 23, 16)
  45. #define Def_Highlight_Color Color_White
  46. #define Def_StatusBg_Color RGB( 0, 23, 16)
  47. #define Def_StatusTxt_Color Color_Yellow
  48. #define Def_PopupBg_color Color_Bg_Window
  49. #define Def_PopupTxt_Color Popup_Text_Color
  50. #define Def_AlertBg_Color Color_Bg_Red
  51. #define Def_AlertTxt_Color Color_Yellow
  52. #define Def_PercentTxt_Color Percent_Color
  53. #define Def_Barfill_Color BarFill_Color
  54. #define Def_Indicator_Color Color_White
  55. #define Def_Coordinate_Color Color_White
  56. //#define HAS_GCODE_PREVIEW 1
  57. #define HAS_ESDIAG 1
  58. #if ENABLED(LED_CONTROL_MENU, HAS_COLOR_LEDS)
  59. #define Def_Leds_Color LEDColorWhite()
  60. #endif
  61. #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
  62. #define Def_CaseLight_Brightness 255
  63. #endif
  64. typedef struct {
  65. // Color settings
  66. uint16_t Background_Color = Def_Background_Color;
  67. uint16_t Cursor_color = Def_Cursor_color;
  68. uint16_t TitleBg_color = Def_TitleBg_color;
  69. uint16_t TitleTxt_color = Def_TitleTxt_color;
  70. uint16_t Text_Color = Def_Text_Color;
  71. uint16_t Selected_Color = Def_Selected_Color;
  72. uint16_t SplitLine_Color = Def_SplitLine_Color;
  73. uint16_t Highlight_Color = Def_Highlight_Color;
  74. uint16_t StatusBg_Color = Def_StatusBg_Color;
  75. uint16_t StatusTxt_Color = Def_StatusTxt_Color;
  76. uint16_t PopupBg_color = Def_PopupBg_color;
  77. uint16_t PopupTxt_Color = Def_PopupTxt_Color;
  78. uint16_t AlertBg_Color = Def_AlertBg_Color;
  79. uint16_t AlertTxt_Color = Def_AlertTxt_Color;
  80. uint16_t PercentTxt_Color = Def_PercentTxt_Color;
  81. uint16_t Barfill_Color = Def_Barfill_Color;
  82. uint16_t Indicator_Color = Def_Indicator_Color;
  83. uint16_t Coordinate_Color = Def_Coordinate_Color;
  84. // Temperatures
  85. #if HAS_HOTEND && defined(PREHEAT_1_TEMP_HOTEND)
  86. int16_t HotendPidT = PREHEAT_1_TEMP_HOTEND;
  87. #endif
  88. #if HAS_HEATED_BED && defined(PREHEAT_1_TEMP_BED)
  89. int16_t BedPidT = PREHEAT_1_TEMP_BED;
  90. #endif
  91. #if HAS_HOTEND || HAS_HEATED_BED
  92. int16_t PidCycles = 10;
  93. #endif
  94. #if ENABLED(PREVENT_COLD_EXTRUSION)
  95. int16_t ExtMinT = EXTRUDE_MINTEMP;
  96. #endif
  97. // Led
  98. #if BOTH(LED_CONTROL_MENU, HAS_COLOR_LEDS)
  99. LEDColor Led_Color = Def_Leds_Color;
  100. #endif
  101. // Case Light
  102. #if ENABLED(CASELIGHT_USES_BRIGHTNESS)
  103. uint8_t CaseLight_Brightness = Def_CaseLight_Brightness;
  104. #endif
  105. } HMI_data_t;
  106. static constexpr size_t eeprom_data_size = 64;
  107. extern HMI_data_t HMI_data;