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.

DGUSDisplayDefinitionFYSETC.h 13KB

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