Przeglądaj źródła

stop homing on wrong limit only if it is hardlimit

titi 5 lat temu
rodzic
commit
7efc6577b5
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      Atm_AccelStepper.cpp

+ 2 - 2
Atm_AccelStepper.cpp

@@ -246,7 +246,7 @@ void Atm_AccelStepper::action( int id ) {
           trigger(EVT_EMERGENCY_STOP);
           push(connectors, ON_ONHOMINGLOW, 0,  _currentStep, homingLow_done);
         }
-        else if (changed && limitHigh_State ){
+        else if (changed && limitHigh_State && _limitHigh_Hard ){ //hit high limit and high is hard, stop
           homingLow_done = 0 ;
           runMode = 0;
           trigger(EVT_EMERGENCY_STOP);
@@ -279,7 +279,7 @@ void Atm_AccelStepper::action( int id ) {
           trigger(EVT_EMERGENCY_STOP);
           push(connectors, ON_ONHOMINGHIGH, 0,  _currentStep, homingHigh_done);
         }
-        else if (changed && limitLow_State ){
+        else if (changed && limitLow_State &&_limitLow_Hard ){ //if hit low limit and low is hard, stop
           homingHigh_done = 0;
           runMode = 0 ;
           trigger(EVT_EMERGENCY_STOP);