My Marlin configs for Fabrikator Mini and CTC i3 Pro B
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

marlinui_dwin.h 4.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. * lcd/e3v2/marlinui/lcdprint_dwin.h
  25. */
  26. #include "../../../inc/MarlinConfigPre.h"
  27. #include "dwin_lcd.h"
  28. typedef uint16_t dwin_coord_t; // Screen can be pretty big
  29. typedef uint16_t lcd_uint_t;
  30. typedef int16_t lcd_int_t;
  31. typedef struct {
  32. uint8_t index, width, height;
  33. uint16_t fg, bg;
  34. bool solid;
  35. } dwin_font_t;
  36. extern dwin_font_t dwin_font;
  37. // Only Western languages support big / small fonts
  38. //#if DISABLED(DISPLAY_CHARSET_ISO10646_1)
  39. // #undef USE_BIG_EDIT_FONT
  40. // #undef USE_SMALL_INFOFONT
  41. //#endif
  42. #if ENABLED(USE_BIG_EDIT_FONT)
  43. #define DWIN_FONT_EDIT font10x20
  44. #else
  45. #define DWIN_FONT_EDIT font8x16
  46. #endif
  47. #define DWIN_FONT_INFO font8x16
  48. #if DWIN_FONT_MENU == font6x12
  49. #define MENU_FONT_WIDTH 6
  50. #define MENU_FONT_ASCENT 10
  51. #define MENU_FONT_DESCENT 2
  52. #elif DWIN_FONT_MENU == font8x16
  53. #define MENU_FONT_WIDTH 8
  54. #define MENU_FONT_ASCENT 13
  55. #define MENU_FONT_DESCENT 3
  56. #elif DWIN_FONT_MENU == font10x20
  57. #define MENU_FONT_WIDTH 10
  58. #define MENU_FONT_ASCENT 16
  59. #define MENU_FONT_DESCENT 4
  60. #endif
  61. #define MENU_FONT_HEIGHT (MENU_FONT_ASCENT + MENU_FONT_DESCENT)
  62. #define EXTRA_ROW_HEIGHT 8
  63. #define MENU_LINE_HEIGHT (MENU_FONT_HEIGHT + EXTRA_ROW_HEIGHT)
  64. #if DWIN_FONT_EDIT == font6x12
  65. #define EDIT_FONT_WIDTH 6
  66. #define EDIT_FONT_ASCENT 10
  67. #define EDIT_FONT_DESCENT 2
  68. #elif DWIN_FONT_EDIT == font8x16
  69. #define EDIT_FONT_WIDTH 8
  70. #define EDIT_FONT_ASCENT 13
  71. #define EDIT_FONT_DESCENT 3
  72. #elif DWIN_FONT_EDIT == font10x20
  73. #define EDIT_FONT_WIDTH 10
  74. #define EDIT_FONT_ASCENT 16
  75. #define EDIT_FONT_DESCENT 4
  76. #endif
  77. #define EDIT_FONT_HEIGHT (EDIT_FONT_ASCENT + EDIT_FONT_DESCENT)
  78. #if DWIN_FONT_INFO == font6x12
  79. #define INFO_FONT_WIDTH 6
  80. #define INFO_FONT_ASCENT 10
  81. #define INFO_FONT_DESCENT 2
  82. #elif DWIN_FONT_INFO == font8x16
  83. #define INFO_FONT_WIDTH 8
  84. #define INFO_FONT_ASCENT 13
  85. #define INFO_FONT_DESCENT 3
  86. #elif DWIN_FONT_INFO == font10x20
  87. #define INFO_FONT_WIDTH 10
  88. #define INFO_FONT_ASCENT 16
  89. #define INFO_FONT_DESCENT 4
  90. #endif
  91. #define INFO_FONT_HEIGHT (INFO_FONT_ASCENT + INFO_FONT_DESCENT)
  92. #if DWIN_FONT_STAT == font6x12
  93. #define STAT_FONT_WIDTH 6
  94. #define STAT_FONT_ASCENT 10
  95. #define STAT_FONT_DESCENT 2
  96. #elif DWIN_FONT_STAT == font8x16
  97. #define STAT_FONT_WIDTH 8
  98. #define STAT_FONT_ASCENT 13
  99. #define STAT_FONT_DESCENT 3
  100. #elif DWIN_FONT_STAT == font10x20
  101. #define STAT_FONT_WIDTH 10
  102. #define STAT_FONT_ASCENT 16
  103. #define STAT_FONT_DESCENT 4
  104. #elif DWIN_FONT_STAT == font12x24
  105. #define STAT_FONT_WIDTH 12
  106. #define STAT_FONT_ASCENT 19
  107. #define STAT_FONT_DESCENT 5
  108. #elif DWIN_FONT_STAT == font14x28
  109. #define STAT_FONT_WIDTH 14
  110. #define STAT_FONT_ASCENT 22
  111. #define STAT_FONT_DESCENT 6
  112. #elif DWIN_FONT_STAT == font16x32
  113. #define STAT_FONT_WIDTH 16
  114. #define STAT_FONT_ASCENT 26
  115. #define STAT_FONT_DESCENT 6
  116. #elif DWIN_FONT_STAT == font20x40
  117. #define STAT_FONT_WIDTH 20
  118. #define STAT_FONT_ASCENT 32
  119. #define STAT_FONT_DESCENT 8
  120. #elif DWIN_FONT_STAT == font24x48
  121. #define STAT_FONT_WIDTH 24
  122. #define STAT_FONT_ASCENT 38
  123. #define STAT_FONT_DESCENT 10
  124. #elif DWIN_FONT_STAT == font28x56
  125. #define STAT_FONT_WIDTH 28
  126. #define STAT_FONT_ASCENT 44
  127. #define STAT_FONT_DESCENT 12
  128. #elif DWIN_FONT_STAT == font32x64
  129. #define STAT_FONT_WIDTH 32
  130. #define STAT_FONT_ASCENT 50
  131. #define STAT_FONT_DESCENT 14
  132. #endif
  133. #define STAT_FONT_HEIGHT (STAT_FONT_ASCENT + STAT_FONT_DESCENT)