Commit badeaf3d authored by MagoKimbra's avatar MagoKimbra

Fix M600

parent 89caa423
...@@ -413,7 +413,7 @@ const unsigned int dropsegments = 5; // everything with less than this number of ...@@ -413,7 +413,7 @@ const unsigned int dropsegments = 5; // everything with less than this number of
// Add support for experimental filament exchange support M600; requires display // Add support for experimental filament exchange support M600; requires display
#ifdef ULTIPANEL #ifdef ULTIPANEL
//#define FILAMENTCHANGEENABLE #define FILAMENTCHANGEENABLE
#ifdef FILAMENTCHANGEENABLE #ifdef FILAMENTCHANGEENABLE
#define FILAMENTCHANGE_XPOS 3 #define FILAMENTCHANGE_XPOS 3
#define FILAMENTCHANGE_YPOS 3 #define FILAMENTCHANGE_YPOS 3
......
...@@ -5663,20 +5663,16 @@ inline void gcode_M503() { ...@@ -5663,20 +5663,16 @@ inline void gcode_M503() {
plan_set_e_position(current_position[E_AXIS]); plan_set_e_position(current_position[E_AXIS]);
// HOME X & Y & Z(only Delta) // HOME X & Y & Z(only Delta)
gcode_G28(true,true); //gcode_G28(true,true); //Trovare un'altra soluzione
#ifdef DELTA #ifdef DELTA
calculate_delta(lastpos); calculate_delta(lastpos);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feedrate/60, active_extruder, active_driver); //move xyz back plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], fr60, active_extruder, active_driver); //move xyz back
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], lastpos[E_AXIS], feedrate/60, active_extruder, active_driver); //final unretract plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], lastpos[E_AXIS], fr60, active_extruder, active_driver); //final unretract
for (int8_t i = 0; i < NUM_AXIS; i++) current_position[i] = lastpos[i];
sync_plan_position_delta();
#else #else
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], target[Z_AXIS], target[E_AXIS], feedrate/60, active_extruder, active_driver); //move xy back plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], target[Z_AXIS], target[E_AXIS], fr60, active_extruder, active_driver); //move xy back
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], feedrate/60, active_extruder, active_driver); //move z back plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], target[E_AXIS], fr60, active_extruder, active_driver); //move z back
plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], lastpos[E_AXIS], feedrate/60, active_extruder, active_driver); //final unretract plan_buffer_line(lastpos[X_AXIS], lastpos[Y_AXIS], lastpos[Z_AXIS], lastpos[E_AXIS], fr60, active_extruder, active_driver); //final unretract
for (int8_t i = 0; i < NUM_AXIS; i++) current_position[i] = lastpos[i];
sync_plan_position();
#endif #endif
#ifdef FILAMENT_RUNOUT_SENSOR #ifdef FILAMENT_RUNOUT_SENSOR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment