Apply TERN to compact code (#17619)
This commit is contained in:
@ -87,9 +87,7 @@ void GcodeSuite::M104() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLED(AUTOTEMP)
|
||||
planner.autotemp_M104_M109();
|
||||
#endif
|
||||
TERN_(AUTOTEMP, planner.autotemp_M104_M109());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -139,9 +137,7 @@ void GcodeSuite::M109() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#if ENABLED(AUTOTEMP)
|
||||
planner.autotemp_M104_M109();
|
||||
#endif
|
||||
TERN_(AUTOTEMP, planner.autotemp_M104_M109());
|
||||
|
||||
if (set_temp)
|
||||
(void)thermalManager.wait_for_hotend(target_extruder, no_wait_for_cooling);
|
||||
|
@ -76,9 +76,7 @@ void GcodeSuite::M190() {
|
||||
const bool no_wait_for_cooling = parser.seenval('S');
|
||||
if (no_wait_for_cooling || parser.seenval('R')) {
|
||||
thermalManager.setTargetBed(parser.value_celsius());
|
||||
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
|
||||
thermalManager.check_timer_autostart(true, false);
|
||||
#endif
|
||||
TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.check_timer_autostart(true, false));
|
||||
}
|
||||
else return;
|
||||
|
||||
|
@ -75,9 +75,7 @@ void GcodeSuite::M191() {
|
||||
const bool no_wait_for_cooling = parser.seenval('S');
|
||||
if (no_wait_for_cooling || parser.seenval('R')) {
|
||||
thermalManager.setTargetChamber(parser.value_celsius());
|
||||
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
|
||||
thermalManager.check_timer_autostart(true, false);
|
||||
#endif
|
||||
TERN_(PRINTJOB_TIMER_AUTOSTART, thermalManager.check_timer_autostart(true, false));
|
||||
}
|
||||
else return;
|
||||
|
||||
|
@ -72,9 +72,7 @@ void GcodeSuite::M303() {
|
||||
const heater_ind_t e = (heater_ind_t)parser.intval('E');
|
||||
if (!WITHIN(e, SI, EI)) {
|
||||
SERIAL_ECHOLNPGM(STR_PID_BAD_EXTRUDER_NUM);
|
||||
#if ENABLED(EXTENSIBLE_UI)
|
||||
ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM);
|
||||
#endif
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onPidTuning(ExtUI::result_t::PID_BAD_EXTRUDER_NUM));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user