My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

menu_temperature.cpp 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  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. //
  23. // Temperature Menu
  24. //
  25. #include "../../inc/MarlinConfigPre.h"
  26. #if HAS_LCD_MENU
  27. #include "menu.h"
  28. #include "../../module/temperature.h"
  29. #if FAN_COUNT > 1 || ENABLED(SINGLENOZZLE)
  30. #include "../../module/motion.h"
  31. #endif
  32. #if ENABLED(SINGLENOZZLE)
  33. #include "../../module/tool_change.h"
  34. #endif
  35. // Initialized by settings.load()
  36. int16_t MarlinUI::preheat_hotend_temp[2], MarlinUI::preheat_bed_temp[2];
  37. uint8_t MarlinUI::preheat_fan_speed[2];
  38. //
  39. // "Temperature" submenu items
  40. //
  41. void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb, const uint8_t fan) {
  42. if (temph > 0) thermalManager.setTargetHotend(MIN(heater_maxtemp[endnum] - 15, temph), endnum);
  43. #if HAS_HEATED_BED
  44. if (tempb >= 0) thermalManager.setTargetBed(tempb);
  45. #else
  46. UNUSED(tempb);
  47. #endif
  48. #if FAN_COUNT > 0
  49. #if FAN_COUNT > 1
  50. thermalManager.set_fan_speed(active_extruder < FAN_COUNT ? active_extruder : 0, fan);
  51. #else
  52. thermalManager.set_fan_speed(0, fan);
  53. #endif
  54. #else
  55. UNUSED(fan);
  56. #endif
  57. ui.return_to_status();
  58. }
  59. #if HOTENDS > 1
  60. void lcd_preheat_m1_e1_only() { _lcd_preheat(1, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
  61. void lcd_preheat_m2_e1_only() { _lcd_preheat(1, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
  62. #if HAS_HEATED_BED
  63. void lcd_preheat_m1_e1() { _lcd_preheat(1, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  64. void lcd_preheat_m2_e1() { _lcd_preheat(1, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  65. #endif
  66. #if HOTENDS > 2
  67. void lcd_preheat_m1_e2_only() { _lcd_preheat(2, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
  68. void lcd_preheat_m2_e2_only() { _lcd_preheat(2, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
  69. #if HAS_HEATED_BED
  70. void lcd_preheat_m1_e2() { _lcd_preheat(2, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  71. void lcd_preheat_m2_e2() { _lcd_preheat(2, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  72. #endif
  73. #if HOTENDS > 3
  74. void lcd_preheat_m1_e3_only() { _lcd_preheat(3, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
  75. void lcd_preheat_m2_e3_only() { _lcd_preheat(3, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
  76. #if HAS_HEATED_BED
  77. void lcd_preheat_m1_e3() { _lcd_preheat(3, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  78. void lcd_preheat_m2_e3() { _lcd_preheat(3, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  79. #endif
  80. #if HOTENDS > 4
  81. void lcd_preheat_m1_e4_only() { _lcd_preheat(4, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
  82. void lcd_preheat_m2_e4_only() { _lcd_preheat(4, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
  83. #if HAS_HEATED_BED
  84. void lcd_preheat_m1_e4() { _lcd_preheat(4, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  85. void lcd_preheat_m2_e4() { _lcd_preheat(4, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  86. #endif
  87. #if HOTENDS > 5
  88. void lcd_preheat_m1_e5_only() { _lcd_preheat(5, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
  89. void lcd_preheat_m2_e5_only() { _lcd_preheat(5, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
  90. #if HAS_HEATED_BED
  91. void lcd_preheat_m1_e5() { _lcd_preheat(5, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  92. void lcd_preheat_m2_e5() { _lcd_preheat(5, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  93. #endif
  94. #endif // HOTENDS > 5
  95. #endif // HOTENDS > 4
  96. #endif // HOTENDS > 3
  97. #endif // HOTENDS > 2
  98. #if HAS_HEATED_BED
  99. void lcd_preheat_m1_e0();
  100. void lcd_preheat_m2_e0();
  101. #else
  102. void lcd_preheat_m1_e0_only();
  103. void lcd_preheat_m2_e0_only();
  104. #endif
  105. void lcd_preheat_m1_all() {
  106. #if HOTENDS > 1
  107. thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 1);
  108. #if HOTENDS > 2
  109. thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 2);
  110. #if HOTENDS > 3
  111. thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 3);
  112. #if HOTENDS > 4
  113. thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 4);
  114. #if HOTENDS > 5
  115. thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 5);
  116. #endif // HOTENDS > 5
  117. #endif // HOTENDS > 4
  118. #endif // HOTENDS > 3
  119. #endif // HOTENDS > 2
  120. #endif // HOTENDS > 1
  121. #if HAS_HEATED_BED
  122. lcd_preheat_m1_e0();
  123. #else
  124. lcd_preheat_m1_e0_only();
  125. #endif
  126. }
  127. void lcd_preheat_m2_all() {
  128. #if HOTENDS > 1
  129. thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 1);
  130. #if HOTENDS > 2
  131. thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 2);
  132. #if HOTENDS > 3
  133. thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 3);
  134. #if HOTENDS > 4
  135. thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 4);
  136. #if HOTENDS > 5
  137. thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 5);
  138. #endif // HOTENDS > 5
  139. #endif // HOTENDS > 4
  140. #endif // HOTENDS > 3
  141. #endif // HOTENDS > 2
  142. #endif // HOTENDS > 1
  143. #if HAS_HEATED_BED
  144. lcd_preheat_m2_e0();
  145. #else
  146. lcd_preheat_m2_e0_only();
  147. #endif
  148. }
  149. #endif // HOTENDS > 1
  150. #if HAS_TEMP_HOTEND || HAS_HEATED_BED
  151. void lcd_preheat_m1_e0_only() { _lcd_preheat(0, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
  152. void lcd_preheat_m2_e0_only() { _lcd_preheat(0, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
  153. #if HAS_HEATED_BED
  154. void lcd_preheat_m1_e0() { _lcd_preheat(0, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  155. void lcd_preheat_m2_e0() { _lcd_preheat(0, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  156. void lcd_preheat_m1_bedonly() { _lcd_preheat(0, 0, ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
  157. void lcd_preheat_m2_bedonly() { _lcd_preheat(0, 0, ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
  158. #endif
  159. void menu_preheat_m1() {
  160. START_MENU();
  161. MENU_BACK(MSG_TEMPERATURE);
  162. #if HOTENDS == 1
  163. #if HAS_HEATED_BED
  164. MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0);
  165. MENU_ITEM(function, MSG_PREHEAT_1_END, lcd_preheat_m1_e0_only);
  166. #else
  167. MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
  168. #endif
  169. #elif HOTENDS > 1
  170. #if HAS_HEATED_BED
  171. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0);
  172. MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only);
  173. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1);
  174. MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E2, lcd_preheat_m1_e1_only);
  175. #else
  176. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0_only);
  177. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1_only);
  178. #endif
  179. #if HOTENDS > 2
  180. #if HAS_HEATED_BED
  181. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2);
  182. MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E3, lcd_preheat_m1_e2_only);
  183. #else
  184. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only);
  185. #endif
  186. #if HOTENDS > 3
  187. #if HAS_HEATED_BED
  188. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3);
  189. MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E4, lcd_preheat_m1_e3_only);
  190. #else
  191. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
  192. #endif
  193. #if HOTENDS > 4
  194. #if HAS_HEATED_BED
  195. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4);
  196. MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E5, lcd_preheat_m1_e4_only);
  197. #else
  198. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4_only);
  199. #endif
  200. #if HOTENDS > 5
  201. #if HAS_HEATED_BED
  202. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5);
  203. MENU_ITEM(function, MSG_PREHEAT_1_END " " MSG_E6, lcd_preheat_m1_e5_only);
  204. #else
  205. MENU_ITEM(function, MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5_only);
  206. #endif
  207. #endif // HOTENDS > 5
  208. #endif // HOTENDS > 4
  209. #endif // HOTENDS > 3
  210. #endif // HOTENDS > 2
  211. MENU_ITEM(function, MSG_PREHEAT_1_ALL, lcd_preheat_m1_all);
  212. #endif // HOTENDS > 1
  213. #if HAS_HEATED_BED
  214. MENU_ITEM(function, MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly);
  215. #endif
  216. END_MENU();
  217. }
  218. void menu_preheat_m2() {
  219. START_MENU();
  220. MENU_BACK(MSG_TEMPERATURE);
  221. #if HOTENDS == 1
  222. #if HAS_HEATED_BED
  223. MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0);
  224. MENU_ITEM(function, MSG_PREHEAT_2_END, lcd_preheat_m2_e0_only);
  225. #else
  226. MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
  227. #endif
  228. #elif HOTENDS > 1
  229. #if HAS_HEATED_BED
  230. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0);
  231. MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only);
  232. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1);
  233. MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E2, lcd_preheat_m2_e1_only);
  234. #else
  235. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0_only);
  236. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1_only);
  237. #endif
  238. #if HOTENDS > 2
  239. #if HAS_HEATED_BED
  240. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2);
  241. MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E3, lcd_preheat_m2_e2_only);
  242. #else
  243. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only);
  244. #endif
  245. #if HOTENDS > 3
  246. #if HAS_HEATED_BED
  247. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3);
  248. MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E4, lcd_preheat_m2_e3_only);
  249. #else
  250. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
  251. #endif
  252. #if HOTENDS > 4
  253. #if HAS_HEATED_BED
  254. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4);
  255. MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E5, lcd_preheat_m2_e4_only);
  256. #else
  257. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4_only);
  258. #endif
  259. #if HOTENDS > 5
  260. #if HAS_HEATED_BED
  261. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5);
  262. MENU_ITEM(function, MSG_PREHEAT_2_END " " MSG_E6, lcd_preheat_m2_e5_only);
  263. #else
  264. MENU_ITEM(function, MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5_only);
  265. #endif
  266. #endif // HOTENDS > 5
  267. #endif // HOTENDS > 4
  268. #endif // HOTENDS > 3
  269. #endif // HOTENDS > 2
  270. MENU_ITEM(function, MSG_PREHEAT_2_ALL, lcd_preheat_m2_all);
  271. #endif // HOTENDS > 1
  272. #if HAS_HEATED_BED
  273. MENU_ITEM(function, MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly);
  274. #endif
  275. END_MENU();
  276. }
  277. void lcd_cooldown() {
  278. thermalManager.zero_fan_speeds();
  279. thermalManager.disable_all_heaters();
  280. ui.return_to_status();
  281. }
  282. #endif // HAS_TEMP_HOTEND || HAS_HEATED_BED
  283. void menu_temperature() {
  284. START_MENU();
  285. MENU_BACK(MSG_MAIN);
  286. //
  287. // Nozzle:
  288. // Nozzle [1-5]:
  289. //
  290. #if HOTENDS == 1
  291. MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0);
  292. #else // HOTENDS > 1
  293. #define EDIT_TARGET(N) MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N)
  294. EDIT_TARGET(0);
  295. EDIT_TARGET(1);
  296. #if HOTENDS > 2
  297. EDIT_TARGET(2);
  298. #if HOTENDS > 3
  299. EDIT_TARGET(3);
  300. #if HOTENDS > 4
  301. EDIT_TARGET(4);
  302. #if HOTENDS > 5
  303. EDIT_TARGET(5);
  304. #endif // HOTENDS > 5
  305. #endif // HOTENDS > 4
  306. #endif // HOTENDS > 3
  307. #endif // HOTENDS > 2
  308. #endif // HOTENDS > 1
  309. #if ENABLED(SINGLENOZZLE)
  310. MENU_MULTIPLIER_ITEM_EDIT(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
  311. #endif
  312. //
  313. // Bed:
  314. //
  315. #if HAS_HEATED_BED
  316. MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed);
  317. #endif
  318. //
  319. // Chamber:
  320. //
  321. #if HAS_HEATED_CHAMBER
  322. MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 5, thermalManager.start_watching_chamber);
  323. #endif
  324. //
  325. // Fan Speed:
  326. //
  327. #if FAN_COUNT > 0
  328. #if HAS_FAN0
  329. MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(percent, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.lcd_tmpfan_speed[0], 0, 255, thermalManager.lcd_setFanSpeed0);
  330. #if ENABLED(EXTRA_FAN_SPEED)
  331. MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255);
  332. #endif
  333. #endif
  334. #if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1)
  335. MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(percent, MSG_FAN_SPEED " 2", &thermalManager.lcd_tmpfan_speed[1], 0, 255, thermalManager.lcd_setFanSpeed1);
  336. #if ENABLED(EXTRA_FAN_SPEED)
  337. MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255);
  338. #endif
  339. #endif
  340. #if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2)
  341. MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(percent, MSG_FAN_SPEED " 3", &thermalManager.lcd_tmpfan_speed[2], 0, 255, thermalManager.lcd_setFanSpeed2);
  342. #if ENABLED(EXTRA_FAN_SPEED)
  343. MENU_MULTIPLIER_ITEM_EDIT(percent, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255);
  344. #endif
  345. #endif
  346. #endif // FAN_COUNT > 0
  347. #if HAS_TEMP_HOTEND
  348. //
  349. // Preheat for Material 1 and 2
  350. //
  351. #if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_5 != 0 || HAS_HEATED_BED
  352. MENU_ITEM(submenu, MSG_PREHEAT_1, menu_preheat_m1);
  353. MENU_ITEM(submenu, MSG_PREHEAT_2, menu_preheat_m2);
  354. #else
  355. MENU_ITEM(function, MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
  356. MENU_ITEM(function, MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
  357. #endif
  358. //
  359. // Cooldown
  360. //
  361. bool has_heat = false;
  362. HOTEND_LOOP() if (thermalManager.temp_hotend[HOTEND_INDEX].target) { has_heat = true; break; }
  363. #if HAS_TEMP_BED
  364. if (thermalManager.temp_bed.target) has_heat = true;
  365. #endif
  366. if (has_heat) MENU_ITEM(function, MSG_COOLDOWN, lcd_cooldown);
  367. #endif // HAS_TEMP_HOTEND
  368. END_MENU();
  369. }
  370. #endif // HAS_LCD_MENU