Cooler (for Laser) - M143, M193 (#21255)
This commit is contained in:
committed by
Scott Lahteine
parent
95136abc47
commit
db4d9b7fcf
@ -195,6 +195,16 @@ void menu_info_thermistors() {
|
||||
STATIC_ITEM(TERN(WATCH_CHAMBER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT);
|
||||
#endif
|
||||
|
||||
#if HAS_COOLER
|
||||
#undef THERMISTOR_ID
|
||||
#define THERMISTOR_ID TEMP_SENSOR_COOLER
|
||||
#include "../thermistornames.h"
|
||||
STATIC_ITEM_P(PSTR("COOL: " THERMISTOR_NAME), SS_INVERT);
|
||||
PSTRING_ITEM(MSG_INFO_MIN_TEMP, STRINGIFY(COOLER_MINTEMP), SS_LEFT);
|
||||
PSTRING_ITEM(MSG_INFO_MAX_TEMP, STRINGIFY(COOLER_MAXTEMP), SS_LEFT);
|
||||
STATIC_ITEM(TERN(WATCH_COOLER, MSG_INFO_RUNAWAY_ON, MSG_INFO_RUNAWAY_OFF), SS_LEFT);
|
||||
#endif
|
||||
|
||||
END_SCREEN();
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,10 @@
|
||||
#include "../../module/motion.h"
|
||||
#endif
|
||||
|
||||
#if HAS_COOLER
|
||||
#include "../../feature/cooler.h"
|
||||
#endif
|
||||
|
||||
#if ENABLED(SINGLENOZZLE_STANDBY_TEMP)
|
||||
#include "../../module/tool_change.h"
|
||||
#endif
|
||||
@ -68,6 +72,10 @@ void Temperature::lcd_preheat(const int16_t e, const int8_t indh, const int8_t i
|
||||
#if HAS_HEATED_BED
|
||||
inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(-1, -1, m); }
|
||||
#endif
|
||||
#if HAS_COOLER
|
||||
inline void _precool_laser(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); }
|
||||
void do_precool_laser_m() { _precool_laser(editable.int8, thermalManager.temp_cooler.target); }
|
||||
#endif
|
||||
|
||||
#if HAS_TEMP_HOTEND && HAS_HEATED_BED
|
||||
inline void _preheat_both(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, m); }
|
||||
@ -143,6 +151,10 @@ void menu_temperature() {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if HAS_COOLER
|
||||
if (thermalManager.temp_cooler.target == 0) thermalManager.temp_cooler.target = COOLER_DEFAULT_TEMP;
|
||||
#endif
|
||||
|
||||
START_MENU();
|
||||
BACK_ITEM(MSG_MAIN);
|
||||
|
||||
@ -176,6 +188,15 @@ void menu_temperature() {
|
||||
EDIT_ITEM_FAST(int3, MSG_CHAMBER, &thermalManager.temp_chamber.target, 0, CHAMBER_MAXTEMP - 10, thermalManager.start_watching_chamber);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Cooler:
|
||||
//
|
||||
#if HAS_COOLER
|
||||
editable.state = cooler.is_enabled();
|
||||
EDIT_ITEM(bool, MSG_COOLER(TOGGLE), &cooler.state, []{ if (editable.state) cooler.disable(); else cooler.enable(); });
|
||||
EDIT_ITEM_FAST(int3, MSG_COOLER, &thermalManager.temp_cooler.target, COOLER_MINTEMP + 2, COOLER_MAXTEMP - 2, thermalManager.start_watching_cooler);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Fan Speed:
|
||||
//
|
||||
@ -232,7 +253,7 @@ void menu_temperature() {
|
||||
editable.int8 = m;
|
||||
#if HOTENDS > 1 || HAS_HEATED_BED
|
||||
SUBMENU_S(ui.get_preheat_label(m), MSG_PREHEAT_M, menu_preheat_m);
|
||||
#else
|
||||
#elif HAS_HOTEND
|
||||
ACTION_ITEM_S(ui.get_preheat_label(m), MSG_PREHEAT_M, do_preheat_end_m);
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user