|
@@ -539,33 +539,52 @@ FORCE_INLINE void process_commands()
|
539
|
539
|
#ifdef QUICK_HOME
|
540
|
540
|
if( code_seen(axis_codes[0]) && code_seen(axis_codes[1]) ) //first diagonal move
|
541
|
541
|
{
|
542
|
|
- current_position[X_AXIS] = 0; current_position[Y_AXIS] = 0;
|
|
542
|
+ current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
|
543
|
543
|
plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
544
|
|
- destination[X_AXIS] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;
|
545
|
|
- destination[Y_AXIS] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR;
|
546
|
|
- feedrate =homing_feedrate[X_AXIS];
|
|
544
|
+ destination[X_AXIS] = 1.5 * X_MAX_LENGTH * X_HOME_DIR;destination[Y_AXIS] = 1.5 * Y_MAX_LENGTH * Y_HOME_DIR;
|
|
545
|
+ feedrate = homing_feedrate[X_AXIS];
|
547
|
546
|
if(homing_feedrate[Y_AXIS]<feedrate)
|
548
|
547
|
feedrate =homing_feedrate[Y_AXIS];
|
549
|
|
- prepare_move();
|
550
|
|
- current_position[X_AXIS] = 0; current_position[Y_AXIS] = 0;
|
|
548
|
+ prepare_move();
|
|
549
|
+
|
|
550
|
+ current_position[X_AXIS] = (X_HOME_DIR == -1) ? 0 : X_MAX_LENGTH;
|
|
551
|
+ current_position[Y_AXIS] = (Y_HOME_DIR == -1) ? 0 : Y_MAX_LENGTH;
|
|
552
|
+ plan_set_position(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS]);
|
|
553
|
+ destination[X_AXIS] = current_position[X_AXIS];
|
|
554
|
+ destination[Y_AXIS] = current_position[Y_AXIS];
|
|
555
|
+ feedrate = 0.0;
|
|
556
|
+ st_synchronize();
|
|
557
|
+ plan_set_position(0, 0, current_position[Z_AXIS], current_position[E_AXIS]);
|
|
558
|
+ current_position[X_AXIS] = 0;current_position[Y_AXIS] = 0;
|
|
559
|
+ endstops_hit_on_purpose();
|
551
|
560
|
}
|
552
|
561
|
#endif
|
553
|
562
|
|
554
|
563
|
if((home_all_axis) || (code_seen(axis_codes[X_AXIS])))
|
555
|
564
|
{
|
556
|
565
|
HOMEAXIS(X);
|
557
|
|
- current_position[0]=code_value()+add_homeing[0];
|
558
|
566
|
}
|
559
|
567
|
|
560
|
568
|
if((home_all_axis) || (code_seen(axis_codes[Y_AXIS]))) {
|
561
|
569
|
HOMEAXIS(Y);
|
562
|
|
- current_position[1]=code_value()+add_homeing[1];
|
563
|
570
|
}
|
564
|
571
|
|
565
|
572
|
if((home_all_axis) || (code_seen(axis_codes[Z_AXIS]))) {
|
566
|
573
|
HOMEAXIS(Z);
|
567
|
|
- current_position[2]=code_value()+add_homeing[2];
|
568
|
|
- }
|
|
574
|
+ }
|
|
575
|
+
|
|
576
|
+ if(code_seen(axis_codes[X_AXIS]))
|
|
577
|
+ {
|
|
578
|
+ current_position[0]=code_value()+add_homeing[0];
|
|
579
|
+ }
|
|
580
|
+
|
|
581
|
+ if(code_seen(axis_codes[Y_AXIS])) {
|
|
582
|
+ current_position[1]=code_value()+add_homeing[1];
|
|
583
|
+ }
|
|
584
|
+
|
|
585
|
+ if(code_seen(axis_codes[Z_AXIS])) {
|
|
586
|
+ current_position[2]=code_value()+add_homeing[2];
|
|
587
|
+ }
|
569
|
588
|
#ifdef ENDSTOPS_ONLY_FOR_HOMING
|
570
|
589
|
enable_endstops(false);
|
571
|
590
|
#endif
|