2018-10-27 18:30:37 -05:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2019-06-27 23:57:50 -05:00
|
|
|
* Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2018-10-27 18:30:37 -05:00
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
2019-06-27 23:57:50 -05:00
|
|
|
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
|
2018-10-27 18:30:37 -05:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
//
|
|
|
|
// Temperature Menu
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "../../inc/MarlinConfigPre.h"
|
|
|
|
|
|
|
|
#if HAS_LCD_MENU
|
|
|
|
|
|
|
|
#include "menu.h"
|
|
|
|
#include "../../module/temperature.h"
|
|
|
|
|
2019-01-20 23:24:53 -06:00
|
|
|
#if FAN_COUNT > 1 || ENABLED(SINGLENOZZLE)
|
2018-10-27 18:30:37 -05:00
|
|
|
#include "../../module/motion.h"
|
|
|
|
#endif
|
|
|
|
|
2019-01-20 23:24:53 -06:00
|
|
|
#if ENABLED(SINGLENOZZLE)
|
|
|
|
#include "../../module/tool_change.h"
|
|
|
|
#endif
|
|
|
|
|
2018-10-28 02:59:21 -05:00
|
|
|
// Initialized by settings.load()
|
2018-11-11 12:16:24 -06:00
|
|
|
int16_t MarlinUI::preheat_hotend_temp[2], MarlinUI::preheat_bed_temp[2];
|
|
|
|
uint8_t MarlinUI::preheat_fan_speed[2];
|
2018-10-28 02:59:21 -05:00
|
|
|
|
2018-10-27 18:30:37 -05:00
|
|
|
//
|
|
|
|
// "Temperature" submenu items
|
|
|
|
//
|
|
|
|
|
|
|
|
void _lcd_preheat(const int16_t endnum, const int16_t temph, const int16_t tempb, const uint8_t fan) {
|
2019-09-10 02:20:49 -05:00
|
|
|
#if HOTENDS
|
|
|
|
if (temph > 0) thermalManager.setTargetHotend(_MIN(heater_maxtemp[endnum] - 15, temph), endnum);
|
|
|
|
#endif
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HAS_HEATED_BED
|
|
|
|
if (tempb >= 0) thermalManager.setTargetBed(tempb);
|
|
|
|
#else
|
|
|
|
UNUSED(tempb);
|
|
|
|
#endif
|
|
|
|
#if FAN_COUNT > 0
|
|
|
|
#if FAN_COUNT > 1
|
2019-01-12 00:41:48 -06:00
|
|
|
thermalManager.set_fan_speed(active_extruder < FAN_COUNT ? active_extruder : 0, fan);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-01-12 00:41:48 -06:00
|
|
|
thermalManager.set_fan_speed(0, fan);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
UNUSED(fan);
|
|
|
|
#endif
|
2018-11-11 12:16:24 -06:00
|
|
|
ui.return_to_status();
|
2018-10-27 18:30:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#if HOTENDS > 1
|
|
|
|
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e1_only() { _lcd_preheat(1, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e1_only() { _lcd_preheat(1, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HAS_HEATED_BED
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e1() { _lcd_preheat(1, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e1() { _lcd_preheat(1, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 2
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e2_only() { _lcd_preheat(2, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e2_only() { _lcd_preheat(2, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HAS_HEATED_BED
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e2() { _lcd_preheat(2, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e2() { _lcd_preheat(2, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 3
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e3_only() { _lcd_preheat(3, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e3_only() { _lcd_preheat(3, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HAS_HEATED_BED
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e3() { _lcd_preheat(3, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e3() { _lcd_preheat(3, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 4
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e4_only() { _lcd_preheat(4, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e4_only() { _lcd_preheat(4, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HAS_HEATED_BED
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e4() { _lcd_preheat(4, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e4() { _lcd_preheat(4, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 5
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e5_only() { _lcd_preheat(5, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e5_only() { _lcd_preheat(5, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HAS_HEATED_BED
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_e5() { _lcd_preheat(5, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e5() { _lcd_preheat(5, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#endif // HOTENDS > 5
|
|
|
|
#endif // HOTENDS > 4
|
|
|
|
#endif // HOTENDS > 3
|
|
|
|
#endif // HOTENDS > 2
|
|
|
|
|
|
|
|
#if HAS_HEATED_BED
|
|
|
|
void lcd_preheat_m1_e0();
|
|
|
|
void lcd_preheat_m2_e0();
|
|
|
|
#else
|
|
|
|
void lcd_preheat_m1_e0_only();
|
|
|
|
void lcd_preheat_m2_e0_only();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void lcd_preheat_m1_all() {
|
|
|
|
#if HOTENDS > 1
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 1);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 2
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 2);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 3
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 3);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 4
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 4);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 5
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[0], 5);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif // HOTENDS > 5
|
|
|
|
#endif // HOTENDS > 4
|
|
|
|
#endif // HOTENDS > 3
|
|
|
|
#endif // HOTENDS > 2
|
|
|
|
#endif // HOTENDS > 1
|
|
|
|
#if HAS_HEATED_BED
|
|
|
|
lcd_preheat_m1_e0();
|
|
|
|
#else
|
|
|
|
lcd_preheat_m1_e0_only();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void lcd_preheat_m2_all() {
|
|
|
|
#if HOTENDS > 1
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 1);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 2
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 2);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 3
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 3);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 4
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 4);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 5
|
2018-11-11 12:16:24 -06:00
|
|
|
thermalManager.setTargetHotend(ui.preheat_hotend_temp[1], 5);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif // HOTENDS > 5
|
|
|
|
#endif // HOTENDS > 4
|
|
|
|
#endif // HOTENDS > 3
|
|
|
|
#endif // HOTENDS > 2
|
|
|
|
#endif // HOTENDS > 1
|
|
|
|
#if HAS_HEATED_BED
|
|
|
|
lcd_preheat_m2_e0();
|
|
|
|
#else
|
|
|
|
lcd_preheat_m2_e0_only();
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // HOTENDS > 1
|
|
|
|
|
|
|
|
#if HAS_TEMP_HOTEND || HAS_HEATED_BED
|
|
|
|
|
2019-09-10 02:20:49 -05:00
|
|
|
#if HOTENDS
|
|
|
|
void lcd_preheat_m1_e0_only() { _lcd_preheat(0, ui.preheat_hotend_temp[0], -1, ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e0_only() { _lcd_preheat(0, ui.preheat_hotend_temp[1], -1, ui.preheat_fan_speed[1]); }
|
|
|
|
#endif
|
2018-10-27 18:30:37 -05:00
|
|
|
|
|
|
|
#if HAS_HEATED_BED
|
2019-09-10 02:20:49 -05:00
|
|
|
#if HOTENDS
|
|
|
|
void lcd_preheat_m1_e0() { _lcd_preheat(0, ui.preheat_hotend_temp[0], ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_e0() { _lcd_preheat(0, ui.preheat_hotend_temp[1], ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
|
|
|
#endif
|
2018-11-11 12:16:24 -06:00
|
|
|
void lcd_preheat_m1_bedonly() { _lcd_preheat(0, 0, ui.preheat_bed_temp[0], ui.preheat_fan_speed[0]); }
|
|
|
|
void lcd_preheat_m2_bedonly() { _lcd_preheat(0, 0, ui.preheat_bed_temp[1], ui.preheat_fan_speed[1]); }
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void menu_preheat_m1() {
|
|
|
|
START_MENU();
|
2019-10-03 05:38:30 -05:00
|
|
|
BACK_ITEM(MSG_TEMPERATURE);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS == 1
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1, lcd_preheat_m1_e0);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END, lcd_preheat_m1_e0_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#elif HOTENDS > 1
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E1, lcd_preheat_m1_e0_only);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E2, lcd_preheat_m1_e1_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H1, lcd_preheat_m1_e0_only);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H2, lcd_preheat_m1_e1_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 2
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E3, lcd_preheat_m1_e2_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H3, lcd_preheat_m1_e2_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 3
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E4, lcd_preheat_m1_e3_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H4, lcd_preheat_m1_e3_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 4
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E5, lcd_preheat_m1_e4_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H5, lcd_preheat_m1_e4_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 5
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_END " " MSG_E6, lcd_preheat_m1_e5_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_N MSG_H6, lcd_preheat_m1_e5_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#endif // HOTENDS > 5
|
|
|
|
#endif // HOTENDS > 4
|
|
|
|
#endif // HOTENDS > 3
|
|
|
|
#endif // HOTENDS > 2
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_ALL, lcd_preheat_m1_all);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif // HOTENDS > 1
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1_BEDONLY, lcd_preheat_m1_bedonly);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
|
|
|
void menu_preheat_m2() {
|
|
|
|
START_MENU();
|
2019-10-03 05:38:30 -05:00
|
|
|
BACK_ITEM(MSG_TEMPERATURE);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS == 1
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2, lcd_preheat_m2_e0);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END, lcd_preheat_m2_e0_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#elif HOTENDS > 1
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E1, lcd_preheat_m2_e0_only);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E2, lcd_preheat_m2_e1_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H1, lcd_preheat_m2_e0_only);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H2, lcd_preheat_m2_e1_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 2
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E3, lcd_preheat_m2_e2_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H3, lcd_preheat_m2_e2_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 3
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E4, lcd_preheat_m2_e3_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H4, lcd_preheat_m2_e3_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 4
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E5, lcd_preheat_m2_e4_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H5, lcd_preheat_m2_e4_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#if HOTENDS > 5
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_END " " MSG_E6, lcd_preheat_m2_e5_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_N MSG_H6, lcd_preheat_m2_e5_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#endif // HOTENDS > 5
|
|
|
|
#endif // HOTENDS > 4
|
|
|
|
#endif // HOTENDS > 3
|
|
|
|
#endif // HOTENDS > 2
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_ALL, lcd_preheat_m2_all);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif // HOTENDS > 1
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_2_BEDONLY, lcd_preheat_m2_bedonly);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
|
|
|
void lcd_cooldown() {
|
2019-01-12 00:41:48 -06:00
|
|
|
thermalManager.zero_fan_speeds();
|
2018-10-27 18:30:37 -05:00
|
|
|
thermalManager.disable_all_heaters();
|
2018-11-11 12:16:24 -06:00
|
|
|
ui.return_to_status();
|
2018-10-27 18:30:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif // HAS_TEMP_HOTEND || HAS_HEATED_BED
|
|
|
|
|
|
|
|
void menu_temperature() {
|
|
|
|
START_MENU();
|
2019-10-03 05:38:30 -05:00
|
|
|
BACK_ITEM(MSG_MAIN);
|
2018-10-27 18:30:37 -05:00
|
|
|
|
|
|
|
//
|
|
|
|
// Nozzle:
|
|
|
|
// Nozzle [1-5]:
|
|
|
|
//
|
|
|
|
#if HOTENDS == 1
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(int3, MSG_NOZZLE, &thermalManager.temp_hotend[0].target, 0, HEATER_0_MAXTEMP - 15, thermalManager.start_watching_E0);
|
2019-09-10 02:20:49 -05:00
|
|
|
#elif HOTENDS > 1
|
2019-10-03 05:38:30 -05:00
|
|
|
#define EDIT_TARGET(N) EDIT_ITEM_FAST(int3, MSG_NOZZLE MSG_LCD_N##N, &thermalManager.temp_hotend[N].target, 0, HEATER_##N##_MAXTEMP - 15, thermalManager.start_watching_E##N)
|
2018-11-03 01:15:02 -05:00
|
|
|
EDIT_TARGET(0);
|
|
|
|
EDIT_TARGET(1);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 2
|
2018-11-03 01:15:02 -05:00
|
|
|
EDIT_TARGET(2);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 3
|
2018-11-03 01:15:02 -05:00
|
|
|
EDIT_TARGET(3);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 4
|
2018-11-03 01:15:02 -05:00
|
|
|
EDIT_TARGET(4);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if HOTENDS > 5
|
2018-11-03 01:15:02 -05:00
|
|
|
EDIT_TARGET(5);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif // HOTENDS > 5
|
|
|
|
#endif // HOTENDS > 4
|
|
|
|
#endif // HOTENDS > 3
|
|
|
|
#endif // HOTENDS > 2
|
|
|
|
#endif // HOTENDS > 1
|
|
|
|
|
2019-01-20 23:24:53 -06:00
|
|
|
#if ENABLED(SINGLENOZZLE)
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(uint16_3, MSG_NOZZLE_STANDBY, &singlenozzle_temp[active_extruder ? 0 : 1], 0, HEATER_0_MAXTEMP - 15);
|
2019-01-20 23:24:53 -06:00
|
|
|
#endif
|
|
|
|
|
2018-10-27 18:30:37 -05:00
|
|
|
//
|
|
|
|
// Bed:
|
|
|
|
//
|
|
|
|
#if HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(int3, MSG_BED, &thermalManager.temp_bed.target, 0, BED_MAXTEMP - 10, thermalManager.start_watching_bed);
|
2019-03-07 02:09:39 -06:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Chamber:
|
|
|
|
//
|
|
|
|
#if HAS_HEATED_CHAMBER
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 5, thermalManager.start_watching_chamber);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Fan Speed:
|
|
|
|
//
|
|
|
|
#if FAN_COUNT > 0
|
|
|
|
#if HAS_FAN0
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.lcd_tmpfan_speed[0], 0, 255, thermalManager.lcd_setFanSpeed0);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if ENABLED(EXTRA_FAN_SPEED)
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED FAN_SPEED_1_SUFFIX, &thermalManager.new_fan_speed[0], 3, 255);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#endif
|
2019-01-12 00:41:48 -06:00
|
|
|
#if HAS_FAN1 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 1)
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED " 2", &thermalManager.lcd_tmpfan_speed[1], 0, 255, thermalManager.lcd_setFanSpeed1);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if ENABLED(EXTRA_FAN_SPEED)
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED " 2", &thermalManager.new_fan_speed[1], 3, 255);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#endif
|
2019-01-12 00:41:48 -06:00
|
|
|
#if HAS_FAN2 || (ENABLED(SINGLENOZZLE) && EXTRUDERS > 2)
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(percent, MSG_FAN_SPEED " 3", &thermalManager.lcd_tmpfan_speed[2], 0, 255, thermalManager.lcd_setFanSpeed2);
|
2018-10-27 18:30:37 -05:00
|
|
|
#if ENABLED(EXTRA_FAN_SPEED)
|
2019-10-03 05:38:30 -05:00
|
|
|
EDIT_ITEM_FAST(percent, MSG_EXTRA_FAN_SPEED " 3", &thermalManager.new_fan_speed[2], 3, 255);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif // FAN_COUNT > 0
|
|
|
|
|
|
|
|
#if HAS_TEMP_HOTEND
|
|
|
|
|
|
|
|
//
|
|
|
|
// Preheat for Material 1 and 2
|
|
|
|
//
|
2019-03-07 01:00:44 -06:00
|
|
|
#if TEMP_SENSOR_1 != 0 || TEMP_SENSOR_2 != 0 || TEMP_SENSOR_3 != 0 || TEMP_SENSOR_4 != 0 || TEMP_SENSOR_5 != 0 || HAS_HEATED_BED
|
2019-10-03 05:38:30 -05:00
|
|
|
SUBMENU(MSG_PREHEAT_1, menu_preheat_m1);
|
|
|
|
SUBMENU(MSG_PREHEAT_2, menu_preheat_m2);
|
2018-10-27 18:30:37 -05:00
|
|
|
#else
|
2019-10-03 05:38:30 -05:00
|
|
|
ACTION_ITEM(MSG_PREHEAT_1, lcd_preheat_m1_e0_only);
|
|
|
|
ACTION_ITEM(MSG_PREHEAT_2, lcd_preheat_m2_e0_only);
|
2018-10-27 18:30:37 -05:00
|
|
|
#endif
|
|
|
|
|
2019-05-25 15:16:00 -05:00
|
|
|
//
|
|
|
|
// Cooldown
|
|
|
|
//
|
|
|
|
bool has_heat = false;
|
|
|
|
HOTEND_LOOP() if (thermalManager.temp_hotend[HOTEND_INDEX].target) { has_heat = true; break; }
|
|
|
|
#if HAS_TEMP_BED
|
|
|
|
if (thermalManager.temp_bed.target) has_heat = true;
|
|
|
|
#endif
|
2019-10-03 05:38:30 -05:00
|
|
|
if (has_heat) ACTION_ITEM(MSG_COOLDOWN, lcd_cooldown);
|
2018-10-27 18:30:37 -05:00
|
|
|
|
2019-05-25 15:16:00 -05:00
|
|
|
#endif // HAS_TEMP_HOTEND
|
2019-01-20 23:41:47 -06:00
|
|
|
|
2018-10-27 18:30:37 -05:00
|
|
|
END_MENU();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // HAS_LCD_MENU
|