|
|
|
@ -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 offset[3] = { 0, 0, 0 };
|
|
|
|
|
static bool home_all_axis = true;
|
|
|
|
|
|
|
|
|
|
#ifndef DELTA
|
|
|
|
|
static bool home_all_axis = true;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static float feedrate = 1500.0, next_feedrate, saved_feedrate;
|
|
|
|
|
static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0;
|
|
|
|
|
|
|
|
|
@ -396,8 +400,8 @@ static bool relative_mode = false; //Determines Absolute or Relative Coordinate
|
|
|
|
|
|
|
|
|
|
static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE];
|
|
|
|
|
#ifdef SDSUPPORT
|
|
|
|
|
static bool fromsd[BUFSIZE];
|
|
|
|
|
#endif //!SDSUPPORT
|
|
|
|
|
static bool fromsd[BUFSIZE];
|
|
|
|
|
#endif
|
|
|
|
|
static int bufindr = 0;
|
|
|
|
|
static int bufindw = 0;
|
|
|
|
|
static int buflen = 0;
|
|
|
|
@ -1233,10 +1237,6 @@ static void do_blocking_move_to(float x, float y, float z) {
|
|
|
|
|
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() {
|
|
|
|
|
saved_feedrate = feedrate;
|
|
|
|
|
saved_feedmultiply = feedmultiply;
|
|
|
|
@ -2150,7 +2150,6 @@ inline void gcode_G28() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int verbose_level = 1;
|
|
|
|
|
float x_tmp, y_tmp, z_tmp, real_z;
|
|
|
|
|
|
|
|
|
|
if (code_seen('V') || code_seen('v')) {
|
|
|
|
|
verbose_level = code_value_long();
|
|
|
|
@ -2436,6 +2435,7 @@ inline void gcode_G28() {
|
|
|
|
|
// When the bed is uneven, this height must be corrected.
|
|
|
|
|
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)
|
|
|
|
|
x_tmp = current_position[X_AXIS] + X_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')) {
|
|
|
|
|
float diameter = code_value();
|
|
|
|
|
// 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
|
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
@ -4580,9 +4579,13 @@ inline void gcode_T() {
|
|
|
|
|
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
boolean make_move = false;
|
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
|
bool make_move = false;
|
|
|
|
|
#endif
|
|
|
|
|
if (code_seen('F')) {
|
|
|
|
|
#if EXTRUDERS > 1
|
|
|
|
|
make_move = true;
|
|
|
|
|
#endif
|
|
|
|
|
next_feedrate = code_value();
|
|
|
|
|
if (next_feedrate > 0.0) feedrate = next_feedrate;
|
|
|
|
|
}
|
|
|
|
@ -5181,12 +5184,10 @@ void ClearToSend()
|
|
|
|
|
|
|
|
|
|
void get_coordinates()
|
|
|
|
|
{
|
|
|
|
|
bool seen[4]={false,false,false,false};
|
|
|
|
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
|
|
|
|
if(code_seen(axis_codes[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?
|
|
|
|
|
}
|
|
|
|
|