do_pause_e_move => unscaled_e_move
This commit is contained in:
parent
fc11e72174
commit
765a9f3471
|
@ -134,15 +134,6 @@ static bool ensure_safe_temperature(const PauseMode mode=PAUSE_MODE_SAME) {
|
||||||
return thermalManager.wait_for_hotend(active_extruder);
|
return thermalManager.wait_for_hotend(active_extruder);
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_pause_e_move(const float &length, const feedRate_t &fr_mm_s) {
|
|
||||||
#if HAS_FILAMENT_SENSOR
|
|
||||||
runout.reset();
|
|
||||||
#endif
|
|
||||||
current_position.e += length / planner.e_factor[active_extruder];
|
|
||||||
line_to_current_position(fr_mm_s);
|
|
||||||
planner.synchronize();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load filament into the hotend
|
* Load filament into the hotend
|
||||||
*
|
*
|
||||||
|
@ -217,7 +208,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Slow Load filament
|
// Slow Load filament
|
||||||
if (slow_load_length) do_pause_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
|
if (slow_load_length) unscaled_e_move(slow_load_length, FILAMENT_CHANGE_SLOW_LOAD_FEEDRATE);
|
||||||
|
|
||||||
// Fast Load Filament
|
// Fast Load Filament
|
||||||
if (fast_load_length) {
|
if (fast_load_length) {
|
||||||
|
@ -226,7 +217,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||||
planner.settings.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
|
planner.settings.retract_acceleration = FILAMENT_CHANGE_FAST_LOAD_ACCEL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
do_pause_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
|
unscaled_e_move(fast_load_length, FILAMENT_CHANGE_FAST_LOAD_FEEDRATE);
|
||||||
|
|
||||||
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
||||||
planner.settings.retract_acceleration = saved_acceleration;
|
planner.settings.retract_acceleration = saved_acceleration;
|
||||||
|
@ -253,7 +244,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||||
#endif
|
#endif
|
||||||
wait_for_user = true; // A click or M108 breaks the purge_length loop
|
wait_for_user = true; // A click or M108 breaks the purge_length loop
|
||||||
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
for (float purge_count = purge_length; purge_count > 0 && wait_for_user; --purge_count)
|
||||||
do_pause_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
unscaled_e_move(1, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||||
wait_for_user = false;
|
wait_for_user = false;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -266,7 +257,7 @@ bool load_filament(const float &slow_load_length/*=0*/, const float &fast_load_l
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Extrude filament to get into hotend
|
// Extrude filament to get into hotend
|
||||||
do_pause_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
unscaled_e_move(purge_length, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||||
|
@ -331,13 +322,13 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Retract filament
|
// Retract filament
|
||||||
do_pause_e_move(-(FILAMENT_UNLOAD_PURGE_RETRACT) * mix_multiplier, (PAUSE_PARK_RETRACT_FEEDRATE) * mix_multiplier);
|
unscaled_e_move(-(FILAMENT_UNLOAD_PURGE_RETRACT) * mix_multiplier, (PAUSE_PARK_RETRACT_FEEDRATE) * mix_multiplier);
|
||||||
|
|
||||||
// Wait for filament to cool
|
// Wait for filament to cool
|
||||||
safe_delay(FILAMENT_UNLOAD_PURGE_DELAY);
|
safe_delay(FILAMENT_UNLOAD_PURGE_DELAY);
|
||||||
|
|
||||||
// Quickly purge
|
// Quickly purge
|
||||||
do_pause_e_move((FILAMENT_UNLOAD_PURGE_RETRACT + FILAMENT_UNLOAD_PURGE_LENGTH) * mix_multiplier,
|
unscaled_e_move((FILAMENT_UNLOAD_PURGE_RETRACT + FILAMENT_UNLOAD_PURGE_LENGTH) * mix_multiplier,
|
||||||
(FILAMENT_UNLOAD_PURGE_FEEDRATE) * mix_multiplier);
|
(FILAMENT_UNLOAD_PURGE_FEEDRATE) * mix_multiplier);
|
||||||
|
|
||||||
// Unload filament
|
// Unload filament
|
||||||
|
@ -346,7 +337,7 @@ bool unload_filament(const float &unload_length, const bool show_lcd/*=false*/,
|
||||||
planner.settings.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
|
planner.settings.retract_acceleration = FILAMENT_CHANGE_UNLOAD_ACCEL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
do_pause_e_move(unload_length * mix_multiplier, (FILAMENT_CHANGE_UNLOAD_FEEDRATE) * mix_multiplier);
|
unscaled_e_move(unload_length * mix_multiplier, (FILAMENT_CHANGE_UNLOAD_FEEDRATE) * mix_multiplier);
|
||||||
|
|
||||||
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
#if FILAMENT_CHANGE_FAST_LOAD_ACCEL > 0
|
||||||
planner.settings.retract_acceleration = saved_acceleration;
|
planner.settings.retract_acceleration = saved_acceleration;
|
||||||
|
@ -436,7 +427,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
|
||||||
|
|
||||||
// Initial retract before move to filament change position
|
// Initial retract before move to filament change position
|
||||||
if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
|
if (retract && thermalManager.hotEnoughToExtrude(active_extruder))
|
||||||
do_pause_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
unscaled_e_move(retract, PAUSE_PARK_RETRACT_FEEDRATE);
|
||||||
|
|
||||||
// Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
|
// Park the nozzle by moving up by z_lift and then moving to (x_pos, y_pos)
|
||||||
if (!axes_need_homing())
|
if (!axes_need_homing())
|
||||||
|
@ -631,11 +622,11 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
|
||||||
#if ENABLED(FWRETRACT)
|
#if ENABLED(FWRETRACT)
|
||||||
// If retracted before goto pause
|
// If retracted before goto pause
|
||||||
if (fwretract.retracted[active_extruder])
|
if (fwretract.retracted[active_extruder])
|
||||||
do_pause_e_move(-fwretract.settings.retract_length, fwretract.settings.retract_feedrate_mm_s);
|
unscaled_e_move(-fwretract.settings.retract_length, fwretract.settings.retract_feedrate_mm_s);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// If resume_position is negative
|
// If resume_position is negative
|
||||||
if (resume_position.e < 0) do_pause_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
|
||||||
|
|
||||||
// Move XY to starting position, then Z
|
// Move XY to starting position, then Z
|
||||||
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
|
||||||
|
@ -644,7 +635,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
|
||||||
do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
|
||||||
|
|
||||||
#if ADVANCED_PAUSE_RESUME_PRIME != 0
|
#if ADVANCED_PAUSE_RESUME_PRIME != 0
|
||||||
do_pause_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
|
unscaled_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Now all extrusion positions are resumed and ready to be confirmed
|
// Now all extrusion positions are resumed and ready to be confirmed
|
||||||
|
|
|
@ -83,8 +83,6 @@ extern uint8_t did_pause_print;
|
||||||
#define DXC_PASS
|
#define DXC_PASS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void do_pause_e_move(const float &length, const feedRate_t &fr_mm_s);
|
|
||||||
|
|
||||||
bool pause_print(const float &retract, const xyz_pos_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS);
|
bool pause_print(const float &retract, const xyz_pos_t &park_point, const float &unload_length=0, const bool show_lcd=false DXC_PARAMS);
|
||||||
|
|
||||||
void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS);
|
void wait_for_confirmation(const bool is_reload=false, const int8_t max_beep_count=0 DXC_PARAMS);
|
||||||
|
|
|
@ -48,14 +48,8 @@
|
||||||
|
|
||||||
#ifdef PHOTO_RETRACT_MM
|
#ifdef PHOTO_RETRACT_MM
|
||||||
inline void e_move_m240(const float length, const feedRate_t &fr_mm_s) {
|
inline void e_move_m240(const float length, const feedRate_t &fr_mm_s) {
|
||||||
if (length && thermalManager.hotEnoughToExtrude(active_extruder)) {
|
if (length && thermalManager.hotEnoughToExtrude(active_extruder))
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
unscaled_e_move(length, fr_mm_s);
|
||||||
do_pause_e_move(length, fr_mm_s);
|
|
||||||
#else
|
|
||||||
current_position.e += length / planner.e_factor[active_extruder];
|
|
||||||
line_to_current_position(fr_mm_s);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace Language_fr {
|
||||||
PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Allumer alim.");
|
PROGMEM Language_Str MSG_SWITCH_PS_ON = _UxGT("Allumer alim.");
|
||||||
PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Eteindre alim.");
|
PROGMEM Language_Str MSG_SWITCH_PS_OFF = _UxGT("Eteindre alim.");
|
||||||
PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrusion");
|
PROGMEM Language_Str MSG_EXTRUDE = _UxGT("Extrusion");
|
||||||
PROGMEM Language_Str MSG_RETRACT = _UxGT("Rétraction");
|
PROGMEM Language_Str MSG_RETRACT = _UxGT("Rétractation");
|
||||||
PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Déplacer un axe");
|
PROGMEM Language_Str MSG_MOVE_AXIS = _UxGT("Déplacer un axe");
|
||||||
PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Régler Niv. lit");
|
PROGMEM Language_Str MSG_BED_LEVELING = _UxGT("Régler Niv. lit");
|
||||||
PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveau du lit");
|
PROGMEM Language_Str MSG_LEVEL_BED = _UxGT("Niveau du lit");
|
||||||
|
@ -317,7 +317,7 @@ namespace Language_fr {
|
||||||
PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Moteurs bloqués");
|
PROGMEM Language_Str MSG_NO_MOVE = _UxGT("Moteurs bloqués");
|
||||||
PROGMEM Language_Str MSG_KILLED = _UxGT("KILLED");
|
PROGMEM Language_Str MSG_KILLED = _UxGT("KILLED");
|
||||||
PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPÉ");
|
PROGMEM Language_Str MSG_STOPPED = _UxGT("STOPPÉ");
|
||||||
PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Rétraction mm");
|
PROGMEM Language_Str MSG_CONTROL_RETRACT = _UxGT("Rétractation mm");
|
||||||
PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm");
|
PROGMEM Language_Str MSG_CONTROL_RETRACT_SWAP = _UxGT("Ech. rétr. mm");
|
||||||
PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract°");
|
PROGMEM Language_Str MSG_CONTROL_RETRACTF = _UxGT("Vit. rétract°");
|
||||||
PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm");
|
PROGMEM Language_Str MSG_CONTROL_RETRACT_ZHOP = _UxGT("Saut Z mm");
|
||||||
|
|
|
@ -55,6 +55,10 @@
|
||||||
#include "../lcd/ultralcd.h"
|
#include "../lcd/ultralcd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_FILAMENT_SENSOR
|
||||||
|
#include "../feature/runout.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(SENSORLESS_HOMING)
|
#if ENABLED(SENSORLESS_HOMING)
|
||||||
#include "../feature/tmc_util.h"
|
#include "../feature/tmc_util.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -332,6 +336,15 @@ void line_to_current_position(const feedRate_t &fr_mm_s/*=feedrate_mm_s*/) {
|
||||||
planner.buffer_line(current_position, fr_mm_s, active_extruder);
|
planner.buffer_line(current_position, fr_mm_s, active_extruder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void unscaled_e_move(const float &length, const feedRate_t &fr_mm_s) {
|
||||||
|
#if HAS_FILAMENT_SENSOR
|
||||||
|
runout.reset();
|
||||||
|
#endif
|
||||||
|
current_position.e += length / planner.e_factor[active_extruder];
|
||||||
|
line_to_current_position(fr_mm_s);
|
||||||
|
planner.synchronize();
|
||||||
|
}
|
||||||
|
|
||||||
#if IS_KINEMATIC
|
#if IS_KINEMATIC
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -184,6 +184,8 @@ void sync_plan_position_e();
|
||||||
*/
|
*/
|
||||||
void line_to_current_position(const feedRate_t &fr_mm_s=feedrate_mm_s);
|
void line_to_current_position(const feedRate_t &fr_mm_s=feedrate_mm_s);
|
||||||
|
|
||||||
|
void unscaled_e_move(const float &length, const feedRate_t &fr_mm_s);
|
||||||
|
|
||||||
void prepare_line_to_destination();
|
void prepare_line_to_destination();
|
||||||
|
|
||||||
void _internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f
|
void _internal_move_to_destination(const feedRate_t &fr_mm_s=0.0f
|
||||||
|
|
|
@ -856,7 +856,7 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
do_pause_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
|
unscaled_e_move(-toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.retract_speed));
|
||||||
#else
|
#else
|
||||||
current_position.e -= toolchange_settings.swap_length / planner.e_factor[old_tool];
|
current_position.e -= toolchange_settings.swap_length / planner.e_factor[old_tool];
|
||||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.retract_speed), old_tool);
|
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.retract_speed), old_tool);
|
||||||
|
@ -991,8 +991,8 @@ void tool_change(const uint8_t new_tool, bool no_move/*=false*/) {
|
||||||
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
#if ENABLED(TOOLCHANGE_FILAMENT_SWAP)
|
||||||
if (should_swap && !too_cold) {
|
if (should_swap && !too_cold) {
|
||||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||||
do_pause_e_move(toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.prime_speed));
|
unscaled_e_move(toolchange_settings.swap_length, MMM_TO_MMS(toolchange_settings.prime_speed));
|
||||||
do_pause_e_move(toolchange_settings.extra_prime, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
unscaled_e_move(toolchange_settings.extra_prime, ADVANCED_PAUSE_PURGE_FEEDRATE);
|
||||||
#else
|
#else
|
||||||
current_position.e += toolchange_settings.swap_length / planner.e_factor[new_tool];
|
current_position.e += toolchange_settings.swap_length / planner.e_factor[new_tool];
|
||||||
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.prime_speed), new_tool);
|
planner.buffer_line(current_position, MMM_TO_MMS(toolchange_settings.prime_speed), new_tool);
|
||||||
|
|
Loading…
Reference in a new issue