Delay Z-Axis on Autoload
Delay z-axis movement when the operators hand is close to the printhead.
This commit is contained in:
parent
e405e9140c
commit
5efae44eb7
|
|
@ -3576,7 +3576,7 @@ static void gcode_M600(const bool automatic, const float x_position, const float
|
||||||
custom_message_type = CustomMsg::Status;
|
custom_message_type = CustomMsg::Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex){
|
void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex, bool raise_z_axis = false){
|
||||||
FSensorBlockRunout fsBlockRunout;
|
FSensorBlockRunout fsBlockRunout;
|
||||||
|
|
||||||
prusa_statistics(22);
|
prusa_statistics(22);
|
||||||
|
|
@ -3592,6 +3592,10 @@ void gcode_M701(float fastLoadLength, uint8_t mmuSlotIndex){
|
||||||
current_position[E_AXIS] += fastLoadLength;
|
current_position[E_AXIS] += fastLoadLength;
|
||||||
plan_buffer_line_curposXYZE(FILAMENTCHANGE_EFEED_FIRST); //fast sequence
|
plan_buffer_line_curposXYZE(FILAMENTCHANGE_EFEED_FIRST); //fast sequence
|
||||||
|
|
||||||
|
if (raise_z_axis) { // backwards compatibility for 3.12 and older FW
|
||||||
|
raise_z_above(MIN_Z_FOR_LOAD);
|
||||||
|
}
|
||||||
|
|
||||||
load_filament_final_feed(); // slow sequence
|
load_filament_final_feed(); // slow sequence
|
||||||
st_synchronize();
|
st_synchronize();
|
||||||
|
|
||||||
|
|
@ -8769,13 +8773,12 @@ Sigma_Exit:
|
||||||
|
|
||||||
// Z lift. For safety only allow positive values
|
// Z lift. For safety only allow positive values
|
||||||
if (code_seen('Z')) z_target = fabs(code_value());
|
if (code_seen('Z')) z_target = fabs(code_value());
|
||||||
else raise_z_above(MIN_Z_FOR_LOAD); // backwards compatibility for 3.12 and older FW
|
|
||||||
|
|
||||||
// Raise the Z axis
|
// Raise the Z axis
|
||||||
float delta = raise_z(z_target);
|
float delta = raise_z(z_target);
|
||||||
|
|
||||||
// Load filament
|
// Load filament
|
||||||
gcode_M701(fastLoadLength, mmuSlotIndex);
|
gcode_M701(fastLoadLength, mmuSlotIndex, !code_seen('Z')); // if no z -> trigger MIN_Z_FOR_LOAD for backwards compatibility on 3.12 and older FW
|
||||||
|
|
||||||
// Restore Z axis
|
// Restore Z axis
|
||||||
raise_z(-delta);
|
raise_z(-delta);
|
||||||
|
|
|
||||||
|
|
@ -1988,7 +1988,6 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
|
||||||
// modified elsewhere and needs to be redrawn in full.
|
// modified elsewhere and needs to be redrawn in full.
|
||||||
|
|
||||||
// reset bFilamentWaitingFlag immediately to avoid re-entry from raise_z_above()!
|
// reset bFilamentWaitingFlag immediately to avoid re-entry from raise_z_above()!
|
||||||
bool once = !bFilamentWaitingFlag;
|
|
||||||
bFilamentWaitingFlag = true;
|
bFilamentWaitingFlag = true;
|
||||||
|
|
||||||
// also force-enable lcd_draw_update (might be 0 when called from outside a menu)
|
// also force-enable lcd_draw_update (might be 0 when called from outside a menu)
|
||||||
|
|
@ -2005,12 +2004,10 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
|
||||||
case FilamentAction::MmuLoad:
|
case FilamentAction::MmuLoad:
|
||||||
case FilamentAction::MmuLoadingTest:
|
case FilamentAction::MmuLoadingTest:
|
||||||
lcd_puts_P(_T(MSG_PREHEATING_TO_LOAD));
|
lcd_puts_P(_T(MSG_PREHEATING_TO_LOAD));
|
||||||
if (once) raise_z_above(MIN_Z_FOR_LOAD);
|
|
||||||
break;
|
break;
|
||||||
case FilamentAction::UnLoad:
|
case FilamentAction::UnLoad:
|
||||||
case FilamentAction::MmuUnLoad:
|
case FilamentAction::MmuUnLoad:
|
||||||
lcd_puts_P(_T(MSG_PREHEATING_TO_UNLOAD));
|
lcd_puts_P(_T(MSG_PREHEATING_TO_UNLOAD));
|
||||||
if (once) raise_z_above(MIN_Z_FOR_UNLOAD);
|
|
||||||
break;
|
break;
|
||||||
case FilamentAction::MmuEject:
|
case FilamentAction::MmuEject:
|
||||||
lcd_puts_P(_T(MSG_PREHEATING_TO_EJECT));
|
lcd_puts_P(_T(MSG_PREHEATING_TO_EJECT));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue