Clean up formatting, wrap macros

This commit is contained in:
Scott Lahteine
2021-04-23 19:06:55 -05:00
parent 72e3d2492f
commit 3bddbb1110
16 changed files with 49 additions and 69 deletions

View File

@ -567,7 +567,7 @@ volatile bool Temperature::raw_temps_ready = false;
SHV(bias);
#if ENABLED(PRINTER_EVENT_LEDS)
const celsius_float_t start_temp = GHV(temp_chamber.celsius, temp_bed.celsius, temp_hotend[heater_id].celsius);
const celsius_float_t start_temp = GHV(degChamber(), degBed(), degHotend(heater_id));
LEDColor color = ONHEATINGSTART();
#endif
@ -583,7 +583,7 @@ volatile bool Temperature::raw_temps_ready = false;
updateTemperaturesFromRawValues();
// Get the current temperature and constrain it
current_temp = GHV(temp_chamber.celsius, temp_bed.celsius, temp_hotend[heater_id].celsius);
current_temp = GHV(degChamber(), degBed(), degHotend(heater_id));
NOLESS(maxT, current_temp);
NOMORE(minT, current_temp);

View File

@ -1054,8 +1054,6 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
first_tool_is_primed = true;
TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready[old_tool] = true); // Primed and initialized
}
#else
constexpr bool first_tool_is_primed = true;
#endif
if (new_tool != old_tool || TERN0(PARKING_EXTRUDER, extruder_parked)) { // PARKING_EXTRUDER may need to attach old_tool when homing
@ -1092,7 +1090,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
}
else {
// For first new tool, change without unloading the old. 'Just prime/init the new'
if (first_tool_is_primed)
if (TERN1(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed))
unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
TERN_(TOOLCHANGE_FS_PRIME_FIRST_USED, first_tool_is_primed = true); // The first new tool will be primed by toolchanging
}