🧑💻 General and Axis-based bitfield flags (#23989)
This commit is contained in:
committed by
Scott Lahteine
parent
d5f472a6cf
commit
d235bc9e1c
@ -46,7 +46,7 @@
|
||||
#endif
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FS_INIT_BEFORE_SWAP)
|
||||
bool toolchange_extruder_ready[EXTRUDERS];
|
||||
Flags<EXTRUDERS> toolchange_extruder_ready;
|
||||
#endif
|
||||
|
||||
#if EITHER(MAGNETIC_PARKING_EXTRUDER, TOOL_SENSOR) \
|
||||
@ -1047,7 +1047,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
if (new_tool == old_tool && !first_tool_is_primed && enable_first_prime) {
|
||||
tool_change_prime();
|
||||
first_tool_is_primed = true;
|
||||
TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready[old_tool] = true); // Primed and initialized
|
||||
TERN_(TOOLCHANGE_FS_INIT_BEFORE_SWAP, toolchange_extruder_ready.set(old_tool)); // Primed and initialized
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1196,7 +1196,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
|
||||
#if ENABLED(TOOLCHANGE_FS_INIT_BEFORE_SWAP)
|
||||
if (!toolchange_extruder_ready[new_tool]) {
|
||||
toolchange_extruder_ready[new_tool] = true;
|
||||
toolchange_extruder_ready.set(new_tool);
|
||||
fr = toolchange_settings.prime_speed; // Next move is a prime
|
||||
unscaled_e_move(0, MMM_TO_MMS(fr)); // Init planner with 0 length move
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||
|
||||
// Migrate the retracted state
|
||||
#if ENABLED(FWRETRACT)
|
||||
fwretract.retracted[migration_extruder] = fwretract.retracted[active_extruder];
|
||||
fwretract.retracted.set(migration_extruder, fwretract.retracted[active_extruder]);
|
||||
#endif
|
||||
|
||||
// Migrate the temperature to the new hotend
|
||||
|
Reference in New Issue
Block a user