Use temperature accessors
This commit is contained in:
parent
6f5800bd74
commit
dfcccb63a1
@ -2709,7 +2709,7 @@ void HMI_AxisMove() {
|
|||||||
case 4: // Extruder
|
case 4: // Extruder
|
||||||
// window tips
|
// window tips
|
||||||
#ifdef PREVENT_COLD_EXTRUSION
|
#ifdef PREVENT_COLD_EXTRUSION
|
||||||
if (thermalManager.wholeDegHotend(0) < (EXTRUDE_MINTEMP)) {
|
if (thermalManager.tooColdToExtrude(0)) {
|
||||||
HMI_flag.ETempTooLow_flag = true;
|
HMI_flag.ETempTooLow_flag = true;
|
||||||
Popup_Window_ETempTooLow();
|
Popup_Window_ETempTooLow();
|
||||||
DWIN_UpdateLCD();
|
DWIN_UpdateLCD();
|
||||||
|
@ -67,7 +67,7 @@ static void _change_filament_with_preset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void _change_filament_with_custom() {
|
static void _change_filament_with_custom() {
|
||||||
_change_filament_with_temp(thermalManager.temp_hotend[MenuItemBase::itemIndex].target);
|
_change_filament_with_temp(thermalManager.degTargetHotend(MenuItemBase::itemIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -147,7 +147,7 @@ void menu_temperature() {
|
|||||||
#if HAS_TEMP_HOTEND || HAS_HEATED_BED
|
#if HAS_TEMP_HOTEND || HAS_HEATED_BED
|
||||||
bool has_heat = false;
|
bool has_heat = false;
|
||||||
#if HAS_TEMP_HOTEND
|
#if HAS_TEMP_HOTEND
|
||||||
HOTEND_LOOP() if (thermalManager.temp_hotend[HOTEND_INDEX].target) { has_heat = true; break; }
|
HOTEND_LOOP() if (thermalManager.degTargetHotend(HOTEND_INDEX)) { has_heat = true; break; }
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ void menu_temperature() {
|
|||||||
//
|
//
|
||||||
// Cooldown
|
// Cooldown
|
||||||
//
|
//
|
||||||
if (TERN0(HAS_HEATED_BED, thermalManager.temp_bed.target)) has_heat = true;
|
if (TERN0(HAS_HEATED_BED, thermalManager.degTargetBed())) has_heat = true;
|
||||||
if (has_heat) ACTION_ITEM(MSG_COOLDOWN, lcd_cooldown);
|
if (has_heat) ACTION_ITEM(MSG_COOLDOWN, lcd_cooldown);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -644,7 +644,7 @@ static void drawAxisValue(AxisEnum axis) {
|
|||||||
static void moveAxis(AxisEnum axis, const int8_t direction) {
|
static void moveAxis(AxisEnum axis, const int8_t direction) {
|
||||||
quick_feedback();
|
quick_feedback();
|
||||||
|
|
||||||
if (axis == E_AXIS && thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) {
|
if (axis == E_AXIS && thermalManager.tooColdToExtrude(motionAxisState.e_selection)) {
|
||||||
drawMessage("Too cold");
|
drawMessage("Too cold");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ static void drawAxisValue(AxisEnum axis) {
|
|||||||
static void moveAxis(AxisEnum axis, const int8_t direction) {
|
static void moveAxis(AxisEnum axis, const int8_t direction) {
|
||||||
quick_feedback();
|
quick_feedback();
|
||||||
|
|
||||||
if (axis == E_AXIS && thermalManager.temp_hotend[motionAxisState.e_selection].celsius < EXTRUDE_MINTEMP) {
|
if (axis == E_AXIS && thermalManager.tooColdToExtrude(motionAxisState.e_selection)) {
|
||||||
drawMessage("Too cold");
|
drawMessage("Too cold");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1381,7 +1381,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
|||||||
|
|
||||||
// Migrate the temperature to the new hotend
|
// Migrate the temperature to the new hotend
|
||||||
#if HAS_MULTI_HOTEND
|
#if HAS_MULTI_HOTEND
|
||||||
thermalManager.setTargetHotend(thermalManager.temp_hotend[active_extruder].target, migration_extruder);
|
thermalManager.setTargetHotend(thermalManager.degTargetHotend(active_extruder), migration_extruder);
|
||||||
TERN_(AUTOTEMP, planner.autotemp_update());
|
TERN_(AUTOTEMP, planner.autotemp_update());
|
||||||
TERN_(HAS_STATUS_MESSAGE, thermalManager.set_heating_message(0));
|
TERN_(HAS_STATUS_MESSAGE, thermalManager.set_heating_message(0));
|
||||||
thermalManager.wait_for_hotend(active_extruder);
|
thermalManager.wait_for_hotend(active_extruder);
|
||||||
|
Loading…
Reference in New Issue
Block a user