|
@ -388,7 +388,11 @@ const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'}; |
|
|
static float destination[NUM_AXIS] = { 0, 0, 0, 0 }; |
|
|
static float destination[NUM_AXIS] = { 0, 0, 0, 0 }; |
|
|
|
|
|
|
|
|
static float offset[3] = { 0, 0, 0 }; |
|
|
static float offset[3] = { 0, 0, 0 }; |
|
|
|
|
|
|
|
|
|
|
|
#ifndef DELTA |
|
|
static bool home_all_axis = true; |
|
|
static bool home_all_axis = true; |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
static float feedrate = 1500.0, next_feedrate, saved_feedrate; |
|
|
static float feedrate = 1500.0, next_feedrate, saved_feedrate; |
|
|
static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0; |
|
|
static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0; |
|
|
|
|
|
|
|
@ -397,7 +401,7 @@ static bool relative_mode = false; //Determines Absolute or Relative Coordinate |
|
|
static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE]; |
|
|
static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE]; |
|
|
#ifdef SDSUPPORT |
|
|
#ifdef SDSUPPORT |
|
|
static bool fromsd[BUFSIZE]; |
|
|
static bool fromsd[BUFSIZE]; |
|
|
#endif //!SDSUPPORT
|
|
|
#endif |
|
|
static int bufindr = 0; |
|
|
static int bufindr = 0; |
|
|
static int bufindw = 0; |
|
|
static int bufindw = 0; |
|
|
static int buflen = 0; |
|
|
static int buflen = 0; |
|
@ -1233,10 +1237,6 @@ static void do_blocking_move_to(float x, float y, float z) { |
|
|
feedrate = oldFeedRate; |
|
|
feedrate = oldFeedRate; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static void do_blocking_move_relative(float offset_x, float offset_y, float offset_z) { |
|
|
|
|
|
do_blocking_move_to(current_position[X_AXIS] + offset_x, current_position[Y_AXIS] + offset_y, current_position[Z_AXIS] + offset_z); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void setup_for_endstop_move() { |
|
|
static void setup_for_endstop_move() { |
|
|
saved_feedrate = feedrate; |
|
|
saved_feedrate = feedrate; |
|
|
saved_feedmultiply = feedmultiply; |
|
|
saved_feedmultiply = feedmultiply; |
|
@ -2150,7 +2150,6 @@ inline void gcode_G28() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int verbose_level = 1; |
|
|
int verbose_level = 1; |
|
|
float x_tmp, y_tmp, z_tmp, real_z; |
|
|
|
|
|
|
|
|
|
|
|
if (code_seen('V') || code_seen('v')) { |
|
|
if (code_seen('V') || code_seen('v')) { |
|
|
verbose_level = code_value_long(); |
|
|
verbose_level = code_value_long(); |
|
@ -2436,6 +2435,7 @@ inline void gcode_G28() { |
|
|
// When the bed is uneven, this height must be corrected.
|
|
|
// When the bed is uneven, this height must be corrected.
|
|
|
if (!dryrun) |
|
|
if (!dryrun) |
|
|
{ |
|
|
{ |
|
|
|
|
|
float x_tmp, y_tmp, z_tmp, real_z; |
|
|
real_z = float(st_get_position(Z_AXIS)) / axis_steps_per_unit[Z_AXIS]; //get the real Z (since the auto bed leveling is already correcting the plane)
|
|
|
real_z = float(st_get_position(Z_AXIS)) / axis_steps_per_unit[Z_AXIS]; //get the real Z (since the auto bed leveling is already correcting the plane)
|
|
|
x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER; |
|
|
x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER; |
|
|
y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER; |
|
|
y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER; |
|
@ -3545,7 +3545,6 @@ inline void gcode_M200() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
float area = .0; |
|
|
|
|
|
if (code_seen('D')) { |
|
|
if (code_seen('D')) { |
|
|
float diameter = code_value(); |
|
|
float diameter = code_value(); |
|
|
// setting any extruder filament size disables volumetric on the assumption that
|
|
|
// setting any extruder filament size disables volumetric on the assumption that
|
|
@ -4283,7 +4282,7 @@ inline void gcode_M502() { |
|
|
* M503: print settings currently in memory |
|
|
* M503: print settings currently in memory |
|
|
*/ |
|
|
*/ |
|
|
inline void gcode_M503() { |
|
|
inline void gcode_M503() { |
|
|
Config_PrintSettings(code_seen('S') && code_value == 0); |
|
|
Config_PrintSettings(code_seen('S') && code_value() == 0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED |
|
|
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED |
|
@ -4580,9 +4579,13 @@ inline void gcode_T() { |
|
|
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); |
|
|
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
boolean make_move = false; |
|
|
#if EXTRUDERS > 1 |
|
|
|
|
|
bool make_move = false; |
|
|
|
|
|
#endif |
|
|
if (code_seen('F')) { |
|
|
if (code_seen('F')) { |
|
|
|
|
|
#if EXTRUDERS > 1 |
|
|
make_move = true; |
|
|
make_move = true; |
|
|
|
|
|
#endif |
|
|
next_feedrate = code_value(); |
|
|
next_feedrate = code_value(); |
|
|
if (next_feedrate > 0.0) feedrate = next_feedrate; |
|
|
if (next_feedrate > 0.0) feedrate = next_feedrate; |
|
|
} |
|
|
} |
|
@ -5181,12 +5184,10 @@ void ClearToSend() |
|
|
|
|
|
|
|
|
void get_coordinates() |
|
|
void get_coordinates() |
|
|
{ |
|
|
{ |
|
|
bool seen[4]={false,false,false,false}; |
|
|
|
|
|
for(int8_t i=0; i < NUM_AXIS; i++) { |
|
|
for(int8_t i=0; i < NUM_AXIS; i++) { |
|
|
if(code_seen(axis_codes[i])) |
|
|
if(code_seen(axis_codes[i])) |
|
|
{ |
|
|
{ |
|
|
destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i]; |
|
|
destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i]; |
|
|
seen[i]=true; |
|
|
|
|
|
} |
|
|
} |
|
|
else destination[i] = current_position[i]; //Are these else lines really needed?
|
|
|
else destination[i] = current_position[i]; //Are these else lines really needed?
|
|
|
} |
|
|
} |
|
|