Create define for two hardcoded values

This commit is contained in:
Guðni Már Gilbert 2023-05-08 19:44:13 +00:00
parent e24c2200f1
commit 3c79e77220
2 changed files with 7 additions and 5 deletions

View File

@ -346,9 +346,11 @@ const unsigned int dropsegments=5; //everything with less than this number of st
// 2nd and 3rd byte (LSB first) contains a 16bit length of a command including its preceding comments.
#define CMDHDRSIZE 3
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10 // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_UNLOAD_FAST_RETRACT_FEEDRATE 86.67f // (mm/s) Unload fast retract feedrate.
#define FILAMENT_UNLOAD_SLOW_RETRACT_FEEDRATE 16.67f // (mm/s) Unload slow retract feedrate.
#define FILAMENT_CHANGE_UNLOAD_FEEDRATE 10.f // (mm/s) Unload filament feedrate. This can be pretty fast.
#define FILAMENT_UNLOAD_FAST_RETRACT_FEEDRATE 86.67f // (mm/s) Unload fast retract feedrate.
#define FILAMENT_UNLOAD_SLOW_RETRACT_FEEDRATE 16.67f // (mm/s) Unload slow retract feedrate.
#define FILAMENT_UNLOAD_FAST_RETRACT_LENGTH 45.f // (mm) Unload fast retract length.
#define FILAMENT_UNLOAD_SLOW_RETRACT_LENGTH 35.f // (mm) Unload slow retract length.
// Firmware based and LCD controlled retract
// M207 and M208 can be used to define parameters for the retraction.

View File

@ -4859,11 +4859,11 @@ void unload_filament(float unloadLength)
FSensorBlockRunout fsBlockRunout;
current_position[E_AXIS] -= 45;
current_position[E_AXIS] -= FILAMENT_UNLOAD_FAST_RETRACT_LENGTH;
plan_buffer_line_curposXYZE(FILAMENT_UNLOAD_FAST_RETRACT_FEEDRATE);
st_synchronize();
current_position[E_AXIS] -= 35;
current_position[E_AXIS] -= FILAMENT_UNLOAD_SLOW_RETRACT_LENGTH;
plan_buffer_line_curposXYZE(FILAMENT_UNLOAD_SLOW_RETRACT_FEEDRATE);
st_synchronize();