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.

menu_temperature.cpp 16KB

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