From 97e47b4494cdfc3c48e70e377ca16c912fd5cc5a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 4 May 2020 22:49:33 -0500 Subject: [PATCH] Wrap some macros --- Marlin/src/gcode/bedlevel/G26.cpp | 2 +- Marlin/src/gcode/lcd/M145.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/bedlevel/G26.cpp b/Marlin/src/gcode/bedlevel/G26.cpp index 9f94c2d9f0..4e2e94a714 100644 --- a/Marlin/src/gcode/bedlevel/G26.cpp +++ b/Marlin/src/gcode/bedlevel/G26.cpp @@ -582,7 +582,7 @@ void GcodeSuite::G26() { if (parser.seenval('H')) { g26_hotend_temp = parser.value_celsius(); - if (!WITHIN(g26_hotend_temp, 165, (HEATER_0_MAXTEMP - HOTEND_OVERSHOOT))) { + if (!WITHIN(g26_hotend_temp, 165, (HEATER_0_MAXTEMP) - (HOTEND_OVERSHOOT))) { SERIAL_ECHOLNPGM("?Specified nozzle temperature not plausible."); return; } diff --git a/Marlin/src/gcode/lcd/M145.cpp b/Marlin/src/gcode/lcd/M145.cpp index 15ff541739..30efa39093 100644 --- a/Marlin/src/gcode/lcd/M145.cpp +++ b/Marlin/src/gcode/lcd/M145.cpp @@ -43,7 +43,7 @@ void GcodeSuite::M145() { int v; if (parser.seenval('H')) { v = parser.value_int(); - ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - HOTEND_OVERSHOOT); + ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, (HEATER_0_MAXTEMP) - (HOTEND_OVERSHOOT)); } if (parser.seenval('F')) { v = parser.value_int();