My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

DGUSDisplayDefinitionOrigin.h 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2019 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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. enum DGUSLCD_Screens : uint8_t {
  24. DGUSLCD_SCREEN_BOOT = 0,
  25. DGUSLCD_SCREEN_MAIN = 10,
  26. DGUSLCD_SCREEN_TEMPERATURE = 20,
  27. DGUSLCD_SCREEN_STATUS = 30,
  28. DGUSLCD_SCREEN_STATUS2 = 32,
  29. DGUSLCD_SCREEN_MANUALMOVE = 40,
  30. DGUSLCD_SCREEN_MANUALEXTRUDE=42,
  31. DGUSLCD_SCREEN_FANANDFEEDRATE = 44,
  32. DGUSLCD_SCREEN_FLOWRATES = 46,
  33. DGUSLCD_SCREEN_SDFILELIST = 50,
  34. DGUSLCD_SCREEN_SDPRINTMANIPULATION = 52,
  35. DGUSLCD_SCREEN_POWER_LOSS = 100,
  36. DGUSLCD_SCREEN_PREHEAT=120,
  37. DGUSLCD_SCREEN_UTILITY=110,
  38. DGUSLCD_SCREEN_FILAMENT_HEATING=146,
  39. DGUSLCD_SCREEN_FILAMENT_LOADING=148,
  40. DGUSLCD_SCREEN_FILAMENT_UNLOADING=158,
  41. DGUSLCD_SCREEN_SDPRINTTUNE = 170,
  42. DGUSLCD_SCREEN_CONFIRM = 240,
  43. DGUSLCD_SCREEN_KILL = 250, ///< Kill Screen. Must always be 250 (to be able to display "Error wrong LCD Version")
  44. DGUSLCD_SCREEN_WAITING = 251,
  45. DGUSLCD_SCREEN_POPUP = 252, ///< special target, popup screen will also return this code to say "return to previous screen"
  46. DGUSLDC_SCREEN_UNUSED = 255
  47. };
  48. // Display Memory layout used (T5UID)
  49. // Except system variables this is arbitrary, just to organize stuff....
  50. // 0x0000 .. 0x0FFF -- System variables and reserved by the display
  51. // 0x1000 .. 0x1FFF -- Variables to never change location, regardless of UI Version
  52. // 0x2000 .. 0x2FFF -- Controls (VPs that will trigger some action)
  53. // 0x3000 .. 0x4FFF -- Marlin Data to be displayed
  54. // 0x5000 .. -- SPs (if we want to modify display elements, e.g change color or like) -- currently unused
  55. // As there is plenty of space (at least most displays have >8k RAM), we do not pack them too tight,
  56. // so that we can keep variables nicely together in the address space.
  57. // UI Version always on 0x1000...0x1002 so that the firmware can check this and bail out.
  58. constexpr uint16_t VP_UI_VERSION_MAJOR = 0x1000; // Major -- incremented when incompatible
  59. constexpr uint16_t VP_UI_VERSION_MINOR = 0x1001; // Minor -- incremented on new features, but compatible
  60. constexpr uint16_t VP_UI_VERSION_PATCH = 0x1002; // Patch -- fixed which do not change functionality.
  61. constexpr uint16_t VP_UI_FLAVOUR = 0x1010; // lets reserve 16 bytes here to determine if UI is suitable for this Marlin. tbd.
  62. // Storage space for the Killscreen messages. 0x1100 - 0x1200 . Reused for the popup.
  63. constexpr uint16_t VP_MSGSTR1 = 0x1100;
  64. constexpr uint8_t VP_MSGSTR1_LEN = 0x20; // might be more place for it...
  65. constexpr uint16_t VP_MSGSTR2 = 0x1140;
  66. constexpr uint8_t VP_MSGSTR2_LEN = 0x20;
  67. constexpr uint16_t VP_MSGSTR3 = 0x1180;
  68. constexpr uint8_t VP_MSGSTR3_LEN = 0x20;
  69. constexpr uint16_t VP_MSGSTR4 = 0x11C0;
  70. constexpr uint8_t VP_MSGSTR4_LEN = 0x20;
  71. // Screenchange request for screens that only make sense when printer is idle.
  72. // e.g movement is only allowed if printer is not printing.
  73. // Marlin must confirm by setting the screen manually.
  74. constexpr uint16_t VP_SCREENCHANGE_ASK = 0x2000;
  75. constexpr uint16_t VP_SCREENCHANGE = 0x2001; // Key-Return button to new menu pressed. Data contains target screen in low byte and info in high byte.
  76. constexpr uint16_t VP_TEMP_ALL_OFF = 0x2002; // Turn all heaters off. Value arbitrary ;)=
  77. constexpr uint16_t VP_SCREENCHANGE_WHENSD = 0x2003; // "Print" Button touched -- go only there if there is an SD Card.
  78. constexpr uint16_t VP_CONFIRMED = 0x2010; // OK on confirm screen.
  79. // Buttons on the SD-Card File listing.
  80. constexpr uint16_t VP_SD_ScrollEvent = 0x2020; // Data: 0 for "up a directory", numbers are the amount to scroll, e.g -1 one up, 1 one down
  81. constexpr uint16_t VP_SD_FileSelected = 0x2022; // Number of file field selected.
  82. constexpr uint16_t VP_SD_FileSelectConfirm = 0x2024; // (This is a virtual VP and emulated by the Confirm Screen when a file has been confirmed)
  83. constexpr uint16_t VP_SD_ResumePauseAbort = 0x2026; // Resume(Data=0), Pause(Data=1), Abort(Data=2) SD Card prints
  84. constexpr uint16_t VP_SD_AbortPrintConfirmed = 0x2028; // Abort print confirmation (virtual, will be injected by the confirm dialog)
  85. constexpr uint16_t VP_SD_Print_Setting = 0x2040;
  86. constexpr uint16_t VP_SD_Print_LiveAdjustZ = 0x2050; // Data: 0 down, 1 up
  87. // Controls for movement (we can't use the incremental / decremental feature of the display at this feature works only with 16 bit values
  88. // (which would limit us to 655.35mm, which is likely not a problem for common setups, but i don't want to rule out hangprinters support)
  89. // A word about the coding: The VP will be per axis and the return code will be an signed 16 bit value in 0.01 mm resolution, telling us
  90. // the relative travel amount t he user wants to do. So eg. if the display sends us VP=2100 with value 100, the user wants us to move X by +1 mm.
  91. constexpr uint16_t VP_MOVE_X = 0x2100;
  92. constexpr uint16_t VP_MOVE_Y = 0x2102;
  93. constexpr uint16_t VP_MOVE_Z = 0x2104;
  94. constexpr uint16_t VP_MOVE_E0 = 0x2110;
  95. constexpr uint16_t VP_MOVE_E1 = 0x2112;
  96. //constexpr uint16_t VP_MOVE_E2 = 0x2114;
  97. //constexpr uint16_t VP_MOVE_E3 = 0x2116;
  98. //constexpr uint16_t VP_MOVE_E4 = 0x2118;
  99. //constexpr uint16_t VP_MOVE_E5 = 0x211A;
  100. constexpr uint16_t VP_HOME_ALL = 0x2120;
  101. constexpr uint16_t VP_MOTOR_LOCK_UNLOK = 0x2130;
  102. // Power loss recovery
  103. constexpr uint16_t VP_POWER_LOSS_RECOVERY = 0x2180;
  104. // Fan Control Buttons , switch between "off" and "on"
  105. constexpr uint16_t VP_FAN0_CONTROL = 0x2200;
  106. constexpr uint16_t VP_FAN1_CONTROL = 0x2202;
  107. //constexpr uint16_t VP_FAN2_CONTROL = 0x2204;
  108. //constexpr uint16_t VP_FAN3_CONTROL = 0x2206;
  109. // Heater Control Buttons , triged between "cool down" and "heat PLA" state
  110. constexpr uint16_t VP_E0_CONTROL = 0x2210;
  111. constexpr uint16_t VP_E1_CONTROL = 0x2212;
  112. //constexpr uint16_t VP_E2_CONTROL = 0x2214;
  113. //constexpr uint16_t VP_E3_CONTROL = 0x2216;
  114. //constexpr uint16_t VP_E4_CONTROL = 0x2218;
  115. //constexpr uint16_t VP_E5_CONTROL = 0x221A;
  116. constexpr uint16_t VP_BED_CONTROL = 0x221C;
  117. // Preheat
  118. constexpr uint16_t VP_E0_BED_PREHEAT = 0x2220;
  119. constexpr uint16_t VP_E1_BED_CONTROL = 0x2222;
  120. //constexpr uint16_t VP_E2_BED_CONTROL = 0x2224;
  121. //constexpr uint16_t VP_E3_BED_CONTROL = 0x2226;
  122. //constexpr uint16_t VP_E4_BED_CONTROL = 0x2228;
  123. //constexpr uint16_t VP_E5_BED_CONTROL = 0x222A;
  124. // Filament load and unload
  125. constexpr uint16_t VP_E0_FILAMENT_LOAD_UNLOAD = 0x2300;
  126. constexpr uint16_t VP_E1_FILAMENT_LOAD_UNLOAD = 0x2302;
  127. // Settings store , reset
  128. constexpr uint16_t VP_SETTINGS = 0x2400;
  129. // PID autotune
  130. constexpr uint16_t VP_PID_AUTOTUNE_E0 = 0x2410;
  131. //constexpr uint16_t VP_PID_AUTOTUNE_E1 = 0x2412;
  132. //constexpr uint16_t VP_PID_AUTOTUNE_E2 = 0x2414;
  133. //constexpr uint16_t VP_PID_AUTOTUNE_E3 = 0x2416;
  134. //constexpr uint16_t VP_PID_AUTOTUNE_E4 = 0x2418;
  135. //constexpr uint16_t VP_PID_AUTOTUNE_E5 = 0x241A;
  136. constexpr uint16_t VP_PID_AUTOTUNE_BED = 0x2420;
  137. // Firmware version on the boot screen.
  138. constexpr uint16_t VP_MARLIN_VERSION = 0x3000;
  139. constexpr uint8_t VP_MARLIN_VERSION_LEN = 16; // there is more space on the display, if needed.
  140. // Place for status messages.
  141. constexpr uint16_t VP_M117 = 0x3020;
  142. constexpr uint8_t VP_M117_LEN = 0x20;
  143. // Temperatures.
  144. constexpr uint16_t VP_T_E0_Is = 0x3060; // 4 Byte Integer
  145. constexpr uint16_t VP_T_E0_Set = 0x3062; // 2 Byte Integer
  146. constexpr uint16_t VP_T_E1_Is = 0x3064; // 4 Byte Integer
  147. // reserved to support up to 6 Extruders:
  148. //constexpr uint16_t VP_T_E1_Set = 0x3066; // 2 Byte Integer
  149. //constexpr uint16_t VP_T_E2_Is = 0x3068; // 4 Byte Integer
  150. //constexpr uint16_t VP_T_E2_Set = 0x306A; // 2 Byte Integer
  151. //constexpr uint16_t VP_T_E3_Is = 0x306C; // 4 Byte Integer
  152. //constexpr uint16_t VP_T_E3_Set = 0x306E; // 2 Byte Integer
  153. //constexpr uint16_t VP_T_E4_Is = 0x3070; // 4 Byte Integer
  154. //constexpr uint16_t VP_T_E4_Set = 0x3072; // 2 Byte Integer
  155. //constexpr uint16_t VP_T_E4_Is = 0x3074; // 4 Byte Integer
  156. //constexpr uint16_t VP_T_E4_Set = 0x3076; // 2 Byte Integer
  157. //constexpr uint16_t VP_T_E5_Is = 0x3078; // 4 Byte Integer
  158. //constexpr uint16_t VP_T_E5_Set = 0x307A; // 2 Byte Integer
  159. constexpr uint16_t VP_T_Bed_Is = 0x3080; // 4 Byte Integer
  160. constexpr uint16_t VP_T_Bed_Set = 0x3082; // 2 Byte Integer
  161. constexpr uint16_t VP_Flowrate_E0 = 0x3090; // 2 Byte Integer
  162. constexpr uint16_t VP_Flowrate_E1 = 0x3092; // 2 Byte Integer
  163. // reserved for up to 6 Extruders:
  164. //constexpr uint16_t VP_Flowrate_E2 = 0x3094;
  165. //constexpr uint16_t VP_Flowrate_E3 = 0x3096;
  166. //constexpr uint16_t VP_Flowrate_E4 = 0x3098;
  167. //constexpr uint16_t VP_Flowrate_E5 = 0x309A;
  168. constexpr uint16_t VP_Fan0_Percentage = 0x3100; // 2 Byte Integer (0..100)
  169. //constexpr uint16_t VP_Fan1_Percentage = 0x33A2; // 2 Byte Integer (0..100)
  170. //constexpr uint16_t VP_Fan2_Percentage = 0x33A4; // 2 Byte Integer (0..100)
  171. //constexpr uint16_t VP_Fan3_Percentage = 0x33A6; // 2 Byte Integer (0..100)
  172. constexpr uint16_t VP_Feedrate_Percentage = 0x3102; // 2 Byte Integer (0..100)
  173. constexpr uint16_t VP_PrintProgress_Percentage = 0x3104; // 2 Byte Integer (0..100)
  174. constexpr uint16_t VP_PrintTime = 0x3106;
  175. constexpr uint16_t VP_PrintTime_LEN = 10;
  176. constexpr uint16_t VP_PrintAccTime = 0x3160;
  177. constexpr uint16_t VP_PrintAccTime_LEN = 32;
  178. constexpr uint16_t VP_PrintsTotal = 0x3180;
  179. constexpr uint16_t VP_PrintsTotal_LEN = 16;
  180. // Actual Position
  181. constexpr uint16_t VP_XPos = 0x3110; // 4 Byte Fixed point number; format xxx.yy
  182. constexpr uint16_t VP_YPos = 0x3112; // 4 Byte Fixed point number; format xxx.yy
  183. constexpr uint16_t VP_ZPos = 0x3114; // 4 Byte Fixed point number; format xxx.yy
  184. constexpr uint16_t VP_EPos = 0x3120; // 4 Byte Fixed point number; format xxx.yy
  185. // SDCard File Listing
  186. constexpr uint16_t VP_SD_FileName_LEN = 32; // LEN is shared for all entries.
  187. constexpr uint16_t DGUS_SD_FILESPERSCREEN = 5; // FIXME move that info to the display and read it from there.
  188. constexpr uint16_t VP_SD_FileName0 = 0x3200;
  189. constexpr uint16_t VP_SD_FileName1 = 0x3220;
  190. constexpr uint16_t VP_SD_FileName2 = 0x3240;
  191. constexpr uint16_t VP_SD_FileName3 = 0x3260;
  192. constexpr uint16_t VP_SD_FileName4 = 0x3280;
  193. constexpr uint16_t VP_SD_Print_ProbeOffsetZ = 0x32A0; //
  194. constexpr uint16_t VP_SD_Print_Filename = 0x32C0; //
  195. // Fan status
  196. constexpr uint16_t VP_FAN0_STATUS = 0x3300;
  197. constexpr uint16_t VP_FAN1_STATUS = 0x3302;
  198. //constexpr uint16_t VP_FAN2_STATUS = 0x3304;
  199. //constexpr uint16_t VP_FAN3_STATUS = 0x3306;
  200. // Heater status
  201. constexpr uint16_t VP_E0_STATUS = 0x3310;
  202. //constexpr uint16_t VP_E1_STATUS = 0x3312;
  203. //constexpr uint16_t VP_E2_STATUS = 0x3314;
  204. //constexpr uint16_t VP_E3_STATUS = 0x3316;
  205. //constexpr uint16_t VP_E4_STATUS = 0x3318;
  206. //constexpr uint16_t VP_E5_STATUS = 0x331A;
  207. constexpr uint16_t VP_BED_STATUS = 0x331C;
  208. constexpr uint16_t VP_MOVE_OPTION = 0x3400;
  209. // Step per mm
  210. constexpr uint16_t VP_X_STEP_PER_MM = 0x3600; // at the moment , 2 byte unsigned int , 0~1638.4
  211. //constexpr uint16_t VP_X2_STEP_PER_MM = 0x3602;
  212. constexpr uint16_t VP_Y_STEP_PER_MM = 0x3604;
  213. //constexpr uint16_t VP_Y2_STEP_PER_MM = 0x3606;
  214. constexpr uint16_t VP_Z_STEP_PER_MM = 0x3608;
  215. //constexpr uint16_t VP_Z2_STEP_PER_MM = 0x360A;
  216. constexpr uint16_t VP_E0_STEP_PER_MM = 0x3610;
  217. //constexpr uint16_t VP_E1_STEP_PER_MM = 0x3612;
  218. //constexpr uint16_t VP_E2_STEP_PER_MM = 0x3614;
  219. //constexpr uint16_t VP_E3_STEP_PER_MM = 0x3616;
  220. //constexpr uint16_t VP_E4_STEP_PER_MM = 0x3618;
  221. //constexpr uint16_t VP_E5_STEP_PER_MM = 0x361A;
  222. // PIDs
  223. constexpr uint16_t VP_E0_PID_P = 0x3700; // at the moment , 2 byte unsigned int , 0~1638.4
  224. constexpr uint16_t VP_E0_PID_I = 0x3702;
  225. constexpr uint16_t VP_E0_PID_D = 0x3704;
  226. constexpr uint16_t VP_BED_PID_P = 0x3710;
  227. constexpr uint16_t VP_BED_PID_I = 0x3712;
  228. constexpr uint16_t VP_BED_PID_D = 0x3714;
  229. // Wating screen status
  230. constexpr uint16_t VP_WAITING_STATUS = 0x3800;
  231. // SPs for certain variables...
  232. // located at 0x5000 and up
  233. // Not used yet!
  234. // This can be used e.g to make controls / data display invisible
  235. constexpr uint16_t SP_T_E0_Is = 0x5000;
  236. constexpr uint16_t SP_T_E0_Set = 0x5010;
  237. constexpr uint16_t SP_T_E1_Is = 0x5020;
  238. constexpr uint16_t SP_T_Bed_Is = 0x5030;
  239. constexpr uint16_t SP_T_Bed_Set = 0x5040;