From 183062947250fb3c50b47e7dcdaaa70708289850 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 24 Apr 2021 05:20:55 -0500 Subject: [PATCH] Use temperature accessors --- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 2 +- Marlin/src/lcd/menu/menu_filament.cpp | 2 +- Marlin/src/lcd/menu/menu_temperature.cpp | 4 ++-- Marlin/src/lcd/tft/ui_1024x600.cpp | 2 +- Marlin/src/lcd/tft/ui_480x320.cpp | 2 +- Marlin/src/module/tool_change.cpp | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index cb7fb2728e..534975ffc1 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -2709,7 +2709,7 @@ void HMI_AxisMove() { case 4: // Extruder // window tips #ifdef PREVENT_COLD_EXTRUSION - if (thermalManager.wholeDegHotend(0) < (EXTRUDE_MINTEMP)) { + if (thermalManager.tooColdToExtrude(0)) { HMI_flag.ETempTooLow_flag = true; Popup_Window_ETempTooLow(); DWIN_UpdateLCD(); diff --git a/Marlin/src/lcd/menu/menu_filament.cpp b/Marlin/src/lcd/menu/menu_filament.cpp index 8df2af1dd0..c6b8568085 100644 --- a/Marlin/src/lcd/menu/menu_filament.cpp +++ b/Marlin/src/lcd/menu/menu_filament.cpp @@ -67,7 +67,7 @@ static void _change_filament_with_preset() { } static void _change_filament_with_custom() { - _change_filament_with_temp(thermalManager.temp_hotend[MenuItemBase::itemIndex].target); + _change_filament_with_temp(thermalManager.degTargetHotend(MenuItemBase::itemIndex)); } // diff --git a/Marlin/src/lcd/menu/menu_temperature.cpp b/Marlin/src/lcd/menu/menu_temperature.cpp index 85578ea351..47643cfb57 100644 --- a/Marlin/src/lcd/menu/menu_temperature.cpp +++ b/Marlin/src/lcd/menu/menu_temperature.cpp @@ -147,7 +147,7 @@ void menu_temperature() { #if HAS_TEMP_HOTEND || HAS_HEATED_BED bool has_heat = false; #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 @@ -271,7 +271,7 @@ void menu_temperature() { // // 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); #endif diff --git a/Marlin/src/lcd/tft/ui_1024x600.cpp b/Marlin/src/lcd/tft/ui_1024x600.cpp index 7a093ea65d..e4cc116818 100644 --- a/Marlin/src/lcd/tft/ui_1024x600.cpp +++ b/Marlin/src/lcd/tft/ui_1024x600.cpp @@ -644,7 +644,7 @@ static void drawAxisValue(AxisEnum axis) { static void moveAxis(AxisEnum axis, const int8_t direction) { 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"); return; } diff --git a/Marlin/src/lcd/tft/ui_480x320.cpp b/Marlin/src/lcd/tft/ui_480x320.cpp index 0d7e01683f..e9ea4b0827 100644 --- a/Marlin/src/lcd/tft/ui_480x320.cpp +++ b/Marlin/src/lcd/tft/ui_480x320.cpp @@ -636,7 +636,7 @@ static void drawAxisValue(AxisEnum axis) { static void moveAxis(AxisEnum axis, const int8_t direction) { 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"); return; } diff --git a/Marlin/src/module/tool_change.cpp b/Marlin/src/module/tool_change.cpp index 8354b8b86a..2e5e59c0af 100644 --- a/Marlin/src/module/tool_change.cpp +++ b/Marlin/src/module/tool_change.cpp @@ -1381,7 +1381,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) { // Migrate the temperature to the new 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_(HAS_STATUS_MESSAGE, thermalManager.set_heating_message(0)); thermalManager.wait_for_hotend(active_extruder);