|
@@ -509,11 +509,9 @@ bool code_seen(char code)
|
509
|
509
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
|
510
|
510
|
\
|
511
|
511
|
current_position[LETTER##_AXIS] = (LETTER##_HOME_DIR == -1) ? 0 : LETTER##_MAX_LENGTH;\
|
512
|
|
- plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\
|
513
|
512
|
destination[LETTER##_AXIS] = current_position[LETTER##_AXIS];\
|
514
|
513
|
feedrate = 0.0;\
|
515
|
514
|
st_synchronize();\
|
516
|
|
- plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\
|
517
|
515
|
endstops_hit_on_purpose();\
|
518
|
516
|
}
|
519
|
517
|
|
|
@@ -567,7 +565,7 @@ void process_commands()
|
567
|
565
|
feedrate = 0.0;
|
568
|
566
|
home_all_axis = !((code_seen(axis_codes[0])) || (code_seen(axis_codes[1])) || (code_seen(axis_codes[2])));
|
569
|
567
|
#ifdef QUICK_HOME
|
570
|
|
- if( code_seen(axis_codes[0]) && code_seen(axis_codes[1]) ) //first diagonal move
|
|
568
|
+ if( code_seen(axis_codes[X_AXIS]) && code_seen(axis_codes[Y_AXIS]) ) //first diagonal move
|
571
|
569
|
{
|
572
|
570
|
current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
|
573
|
571
|
|
|
@@ -585,10 +583,10 @@ void process_commands()
|
585
|
583
|
destination[Y_AXIS] = current_position[Y_AXIS];
|
586
|
584
|
feedrate = 0.0;
|
587
|
585
|
st_synchronize();
|
588
|
|
- plan_set_position(0, 0, current_position[Z_AXIS], current_position[E_AXIS]);
|
589
|
|
- current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
|
590
|
586
|
endstops_hit_on_purpose();
|
591
|
587
|
}
|
|
588
|
+ else
|
|
589
|
+ {
|
592
|
590
|
#endif
|
593
|
591
|
|
594
|
592
|
if((home_all_axis) || (code_seen(axis_codes[X_AXIS])))
|
|
@@ -599,7 +597,11 @@ void process_commands()
|
599
|
597
|
if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) {
|
600
|
598
|
HOMEAXIS(Y);
|
601
|
599
|
}
|
602
|
|
-
|
|
600
|
+
|
|
601
|
+ #ifdef QUICK_HOME
|
|
602
|
+ }
|
|
603
|
+ #endif
|
|
604
|
+
|
603
|
605
|
if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
|
604
|
606
|
HOMEAXIS(Z);
|
605
|
607
|
}
|
|
@@ -616,6 +618,8 @@ void process_commands()
|
616
|
618
|
if(code_seen(axis_codes[Z_AXIS])) {
|
617
|
619
|
current_position[2]=code_value()+add_homeing[2];
|
618
|
620
|
}
|
|
621
|
+ plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
622
|
+
|
619
|
623
|
#ifdef ENDSTOPS_ONLY_FOR_HOMING
|
620
|
624
|
enable_endstops(false);
|
621
|
625
|
#endif
|
|
@@ -1254,19 +1258,6 @@ void get_arc_coordinates()
|
1254
|
1258
|
|
1255
|
1259
|
void prepare_move()
|
1256
|
1260
|
{
|
1257
|
|
-
|
1258
|
|
- if (min_software_endstops) {
|
1259
|
|
- if (destination[X_AXIS] < 0) destination[X_AXIS] = 0.0;
|
1260
|
|
- if (destination[Y_AXIS] < 0) destination[Y_AXIS] = 0.0;
|
1261
|
|
- if (destination[Z_AXIS] < 0) destination[Z_AXIS] = 0.0;
|
1262
|
|
- }
|
1263
|
|
-
|
1264
|
|
- if (max_software_endstops) {
|
1265
|
|
- if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
|
1266
|
|
- if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
|
1267
|
|
- if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
|
1268
|
|
- }
|
1269
|
|
-
|
1270
|
1261
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder);
|
1271
|
1262
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
1272
|
1263
|
current_position[i] = destination[i];
|