Cleanup M600 init
Instead of removing FILAMENTCHANGE_FINALRETRACT just set it to 0 No change in memory
This commit is contained in:
parent
8556336185
commit
71180ac284
|
|
@ -3456,7 +3456,7 @@ static void mmu_M600_load_filament(bool automatic, float nozzle_temp) {
|
|||
st_synchronize();
|
||||
}
|
||||
|
||||
static void gcode_M600(bool automatic, float x_position, float y_position, float z_shift, float e_shift, float e_shift_late) {
|
||||
static void gcode_M600(const bool automatic, const float x_position, const float y_position, const float z_shift, const float e_shift, const float e_shift_late) {
|
||||
st_synchronize();
|
||||
float lastpos[4];
|
||||
|
||||
|
|
@ -7582,69 +7582,40 @@ Sigma_Exit:
|
|||
|
||||
M600 [ X | Y | Z | E | L | AUTO ]
|
||||
|
||||
- `X` - X position, default 211
|
||||
- `Y` - Y position, default 0
|
||||
- `X` - X position, default FILAMENTCHANGE_XPOS
|
||||
- `Y` - Y position, default FILAMENTCHANGE_YPOS
|
||||
- `Z` - relative lift Z, default MIN_Z_FOR_SWAP.
|
||||
- `E` - initial retract, default -2
|
||||
- `L` - later retract distance for removal, default 0
|
||||
- `E` - initial retract, default FILAMENTCHANGE_FIRSTRETRACT
|
||||
- `L` - later retract distance for removal, default FILAMENTCHANGE_FINALRETRACT
|
||||
- `AUTO` - Automatically (only with MMU)
|
||||
*/
|
||||
case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
|
||||
{
|
||||
st_synchronize();
|
||||
{
|
||||
st_synchronize();
|
||||
|
||||
float x_position = current_position[X_AXIS];
|
||||
float y_position = current_position[Y_AXIS];
|
||||
float z_shift = MIN_Z_FOR_SWAP;
|
||||
float e_shift_init = 0;
|
||||
float e_shift_late = 0;
|
||||
bool automatic = false;
|
||||
|
||||
//Retract extruder
|
||||
if(code_seen('E'))
|
||||
{
|
||||
e_shift_init = code_value();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef FILAMENTCHANGE_FIRSTRETRACT
|
||||
e_shift_init = FILAMENTCHANGE_FIRSTRETRACT ;
|
||||
#endif
|
||||
}
|
||||
float x_position = FILAMENTCHANGE_XPOS;
|
||||
float y_position = FILAMENTCHANGE_YPOS;
|
||||
float z_shift = MIN_Z_FOR_SWAP;
|
||||
float e_shift_init = FILAMENTCHANGE_FIRSTRETRACT;
|
||||
float e_shift_late = FILAMENTCHANGE_FINALRETRACT;
|
||||
bool automatic = false;
|
||||
|
||||
if (code_seen('L')) e_shift_late = code_value();
|
||||
//Retract extruder
|
||||
if (code_seen('E')) e_shift_init = code_value();
|
||||
if (code_seen('L')) e_shift_late = code_value();
|
||||
|
||||
// Z lift. For safety only allow positive values
|
||||
if (code_seen('Z')) z_shift = fabs(code_value());
|
||||
// Z lift. For safety only allow positive values
|
||||
if (code_seen('Z')) z_shift = fabs(code_value());
|
||||
|
||||
//Move XY to side
|
||||
if(code_seen('X'))
|
||||
{
|
||||
x_position = code_value();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef FILAMENTCHANGE_XPOS
|
||||
x_position = FILAMENTCHANGE_XPOS;
|
||||
#endif
|
||||
}
|
||||
if(code_seen('Y'))
|
||||
{
|
||||
y_position = code_value();
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef FILAMENTCHANGE_YPOS
|
||||
y_position = FILAMENTCHANGE_YPOS ;
|
||||
#endif
|
||||
}
|
||||
//Move XY to side
|
||||
if (code_seen('X')) x_position = code_value();
|
||||
if (code_seen('Y')) y_position = code_value();
|
||||
|
||||
if (MMU2::mmu2.Enabled() && code_seen_P(PSTR("AUTO")))
|
||||
automatic = true;
|
||||
if (MMU2::mmu2.Enabled() && code_seen_P(PSTR("AUTO")))
|
||||
automatic = true;
|
||||
|
||||
gcode_M600(automatic, x_position, y_position, z_shift, e_shift_init, e_shift_late);
|
||||
|
||||
}
|
||||
gcode_M600(automatic, x_position, y_position, z_shift, e_shift_init, e_shift_late);
|
||||
}
|
||||
break;
|
||||
#endif //FILAMENTCHANGEENABLE
|
||||
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -219,6 +219,7 @@
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -358,6 +358,7 @@
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -362,6 +362,7 @@
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 25 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -149,6 +149,7 @@ CHANGE FILAMENT SETTINGS
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 50 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ CHANGE FILAMENT SETTINGS
|
|||
#define FILAMENTCHANGE_YPOS 0
|
||||
#define FILAMENTCHANGE_ZADD 2
|
||||
#define FILAMENTCHANGE_FIRSTRETRACT -2
|
||||
#define FILAMENTCHANGE_FINALRETRACT 0
|
||||
|
||||
#define FILAMENTCHANGE_FIRSTFEED 70 //E distance in mm for fast filament loading sequence used used in filament change (M600)
|
||||
#define FILAMENTCHANGE_FINALFEED 50 //E distance in mm for slow filament loading sequence used used in filament change (M600) and filament load (M701)
|
||||
|
|
|
|||
Loading…
Reference in New Issue