|
@@ -388,7 +388,11 @@ const char axis_codes[NUM_AXIS] = {'X', 'Y', 'Z', 'E'};
|
388
|
388
|
static float destination[NUM_AXIS] = { 0, 0, 0, 0 };
|
389
|
389
|
|
390
|
390
|
static float offset[3] = { 0, 0, 0 };
|
391
|
|
-static bool home_all_axis = true;
|
|
391
|
+
|
|
392
|
+#ifndef DELTA
|
|
393
|
+ static bool home_all_axis = true;
|
|
394
|
+#endif
|
|
395
|
+
|
392
|
396
|
static float feedrate = 1500.0, next_feedrate, saved_feedrate;
|
393
|
397
|
static long gcode_N, gcode_LastN, Stopped_gcode_LastN = 0;
|
394
|
398
|
|
|
@@ -396,8 +400,8 @@ static bool relative_mode = false; //Determines Absolute or Relative Coordinate
|
396
|
400
|
|
397
|
401
|
static char cmdbuffer[BUFSIZE][MAX_CMD_SIZE];
|
398
|
402
|
#ifdef SDSUPPORT
|
399
|
|
-static bool fromsd[BUFSIZE];
|
400
|
|
-#endif //!SDSUPPORT
|
|
403
|
+ static bool fromsd[BUFSIZE];
|
|
404
|
+#endif
|
401
|
405
|
static int bufindr = 0;
|
402
|
406
|
static int bufindw = 0;
|
403
|
407
|
static int buflen = 0;
|
|
@@ -1233,10 +1237,6 @@ static void do_blocking_move_to(float x, float y, float z) {
|
1233
|
1237
|
feedrate = oldFeedRate;
|
1234
|
1238
|
}
|
1235
|
1239
|
|
1236
|
|
-static void do_blocking_move_relative(float offset_x, float offset_y, float offset_z) {
|
1237
|
|
- do_blocking_move_to(current_position[X_AXIS] + offset_x, current_position[Y_AXIS] + offset_y, current_position[Z_AXIS] + offset_z);
|
1238
|
|
-}
|
1239
|
|
-
|
1240
|
1240
|
static void setup_for_endstop_move() {
|
1241
|
1241
|
saved_feedrate = feedrate;
|
1242
|
1242
|
saved_feedmultiply = feedmultiply;
|
|
@@ -2150,7 +2150,6 @@ inline void gcode_G28() {
|
2150
|
2150
|
}
|
2151
|
2151
|
|
2152
|
2152
|
int verbose_level = 1;
|
2153
|
|
- float x_tmp, y_tmp, z_tmp, real_z;
|
2154
|
2153
|
|
2155
|
2154
|
if (code_seen('V') || code_seen('v')) {
|
2156
|
2155
|
verbose_level = code_value_long();
|
|
@@ -2436,6 +2435,7 @@ inline void gcode_G28() {
|
2436
|
2435
|
// When the bed is uneven, this height must be corrected.
|
2437
|
2436
|
if (!dryrun)
|
2438
|
2437
|
{
|
|
2438
|
+ float x_tmp, y_tmp, z_tmp, real_z;
|
2439
|
2439
|
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)
|
2440
|
2440
|
x_tmp = current_position[X_AXIS] + X_PROBE_OFFSET_FROM_EXTRUDER;
|
2441
|
2441
|
y_tmp = current_position[Y_AXIS] + Y_PROBE_OFFSET_FROM_EXTRUDER;
|
|
@@ -3545,7 +3545,6 @@ inline void gcode_M200() {
|
3545
|
3545
|
}
|
3546
|
3546
|
}
|
3547
|
3547
|
|
3548
|
|
- float area = .0;
|
3549
|
3548
|
if (code_seen('D')) {
|
3550
|
3549
|
float diameter = code_value();
|
3551
|
3550
|
// setting any extruder filament size disables volumetric on the assumption that
|
|
@@ -4283,7 +4282,7 @@ inline void gcode_M502() {
|
4283
|
4282
|
* M503: print settings currently in memory
|
4284
|
4283
|
*/
|
4285
|
4284
|
inline void gcode_M503() {
|
4286
|
|
- Config_PrintSettings(code_seen('S') && code_value == 0);
|
|
4285
|
+ Config_PrintSettings(code_seen('S') && code_value() == 0);
|
4287
|
4286
|
}
|
4288
|
4287
|
|
4289
|
4288
|
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
|
|
@@ -4580,9 +4579,13 @@ inline void gcode_T() {
|
4580
|
4579
|
SERIAL_ECHOLN(MSG_INVALID_EXTRUDER);
|
4581
|
4580
|
}
|
4582
|
4581
|
else {
|
4583
|
|
- boolean make_move = false;
|
|
4582
|
+ #if EXTRUDERS > 1
|
|
4583
|
+ bool make_move = false;
|
|
4584
|
+ #endif
|
4584
|
4585
|
if (code_seen('F')) {
|
4585
|
|
- make_move = true;
|
|
4586
|
+ #if EXTRUDERS > 1
|
|
4587
|
+ make_move = true;
|
|
4588
|
+ #endif
|
4586
|
4589
|
next_feedrate = code_value();
|
4587
|
4590
|
if (next_feedrate > 0.0) feedrate = next_feedrate;
|
4588
|
4591
|
}
|
|
@@ -5181,12 +5184,10 @@ void ClearToSend()
|
5181
|
5184
|
|
5182
|
5185
|
void get_coordinates()
|
5183
|
5186
|
{
|
5184
|
|
- bool seen[4]={false,false,false,false};
|
5185
|
5187
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
5186
|
5188
|
if(code_seen(axis_codes[i]))
|
5187
|
5189
|
{
|
5188
|
5190
|
destination[i] = (float)code_value() + (axis_relative_modes[i] || relative_mode)*current_position[i];
|
5189
|
|
- seen[i]=true;
|
5190
|
5191
|
}
|
5191
|
5192
|
else destination[i] = current_position[i]; //Are these else lines really needed?
|
5192
|
5193
|
}
|