|
@@ -513,20 +513,22 @@ bool code_seen(char code)
|
513
|
513
|
destination[LETTER##_AXIS] = 1.5 * LETTER##_MAX_LENGTH * LETTER##_HOME_DIR; \
|
514
|
514
|
feedrate = homing_feedrate[LETTER##_AXIS]; \
|
515
|
515
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
|
|
516
|
+ st_synchronize();\
|
516
|
517
|
\
|
517
|
518
|
current_position[LETTER##_AXIS] = 0;\
|
518
|
519
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);\
|
519
|
520
|
destination[LETTER##_AXIS] = -LETTER##_HOME_RETRACT_MM * LETTER##_HOME_DIR;\
|
520
|
521
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
|
|
522
|
+ st_synchronize();\
|
521
|
523
|
\
|
522
|
524
|
destination[LETTER##_AXIS] = 2*LETTER##_HOME_RETRACT_MM * LETTER##_HOME_DIR;\
|
523
|
525
|
feedrate = homing_feedrate[LETTER##_AXIS]/2 ; \
|
524
|
526
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
|
|
527
|
+ st_synchronize();\
|
525
|
528
|
\
|
526
|
529
|
current_position[LETTER##_AXIS] = (LETTER##_HOME_DIR == -1) ? LETTER##_HOME_POS : LETTER##_MAX_LENGTH;\
|
527
|
530
|
destination[LETTER##_AXIS] = current_position[LETTER##_AXIS];\
|
528
|
531
|
feedrate = 0.0;\
|
529
|
|
- st_synchronize();\
|
530
|
532
|
endstops_hit_on_purpose();\
|
531
|
533
|
}
|
532
|
534
|
|
|
@@ -589,13 +591,15 @@ void process_commands()
|
589
|
591
|
feedrate = homing_feedrate[X_AXIS];
|
590
|
592
|
if(homing_feedrate[Y_AXIS]<feedrate)
|
591
|
593
|
feedrate =homing_feedrate[Y_AXIS];
|
592
|
|
- prepare_move();
|
|
594
|
+ plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
|
|
595
|
+ st_synchronize();
|
593
|
596
|
|
594
|
597
|
current_position[X_AXIS] = (X_HOME_DIR == -1) ? X_HOME_POS : X_MAX_LENGTH;
|
595
|
598
|
current_position[Y_AXIS] = (Y_HOME_DIR == -1) ? Y_HOME_POS : Y_MAX_LENGTH;
|
596
|
599
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
597
|
600
|
destination[X_AXIS] = current_position[X_AXIS];
|
598
|
601
|
destination[Y_AXIS] = current_position[Y_AXIS];
|
|
602
|
+ plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate/60, active_extruder); \
|
599
|
603
|
feedrate = 0.0;
|
600
|
604
|
st_synchronize();
|
601
|
605
|
endstops_hit_on_purpose();
|
|
@@ -1273,6 +1277,18 @@ void get_arc_coordinates()
|
1273
|
1277
|
|
1274
|
1278
|
void prepare_move()
|
1275
|
1279
|
{
|
|
1280
|
+ if (min_software_endstops) {
|
|
1281
|
+ if (destination[X_AXIS] < X_HOME_POS) destination[X_AXIS] = X_HOME_POS;
|
|
1282
|
+ if (destination[Y_AXIS] < Y_HOME_POS) destination[Y_AXIS] = Y_HOME_POS;
|
|
1283
|
+ if (destination[Z_AXIS] < Z_HOME_POS) destination[Z_AXIS] = Z_HOME_POS;
|
|
1284
|
+ }
|
|
1285
|
+
|
|
1286
|
+ if (max_software_endstops) {
|
|
1287
|
+ if (destination[X_AXIS] > X_MAX_LENGTH) destination[X_AXIS] = X_MAX_LENGTH;
|
|
1288
|
+ if (destination[Y_AXIS] > Y_MAX_LENGTH) destination[Y_AXIS] = Y_MAX_LENGTH;
|
|
1289
|
+ if (destination[Z_AXIS] > Z_MAX_LENGTH) destination[Z_AXIS] = Z_MAX_LENGTH;
|
|
1290
|
+ }
|
|
1291
|
+
|
1276
|
1292
|
plan_buffer_line(destination[X_AXIS], destination[Y_AXIS], destination[Z_AXIS], destination[E_AXIS], feedrate*feedmultiply/60/100.0, active_extruder);
|
1277
|
1293
|
for(int8_t i=0; i < NUM_AXIS; i++) {
|
1278
|
1294
|
current_position[i] = destination[i];
|