|
@@ -165,7 +165,7 @@ void Atm_AccelStepper::action( int id ) {
|
|
|
|
|
|
case ENT_RUNNING:
|
|
|
push(connectors, ON_CHANGESTATE, 0, state(), 0);
|
|
|
- _currentSpeed = stepper->speed();
|
|
|
+
|
|
|
if (last_trigger!=EVT_ON_LIMIT_LOW && last_trigger!=EVT_ON_LIMIT_HIGH){compensatePlay(_currentSpeed);}
|
|
|
if (runMode){stepper->setSpeed( _currentSpeed);}
|
|
|
else{stepper->moveTo(_targetStep);}
|
|
@@ -501,8 +501,8 @@ Atm_AccelStepper& Atm_AccelStepper::moveToPercent( float percent) {
|
|
|
|
|
|
Atm_AccelStepper& Atm_AccelStepper::rotate( long int speed) {
|
|
|
runMode = 1;
|
|
|
-
|
|
|
stepper->setSpeed( speed);
|
|
|
+ _currentSpeed = stepper->speed();
|
|
|
enable();
|
|
|
trigger( EVT_MOVE );
|
|
|
return *this;
|