diff --git a/library.json b/library.json index 8ae4153..ea28124 100644 --- a/library.json +++ b/library.json @@ -10,7 +10,7 @@ "type": "git", "url": "https://github.com/pkerspe/ESP-FlexyStepper.git" }, - "version": "1.4.1", + "version": "1.4.2", "license": "MIT", "frameworks": "arduino", "platforms": [ diff --git a/library.properties b/library.properties index b440f41..c4ec6f2 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP-FlexyStepper -version=1.4.1 +version=1.4.2 author=Paul Kerspe maintainer=Paul Kerspe sentence=This library is used to control one or more stepper motors from an ESP32 device diff --git a/src/ESP_FlexyStepper.cpp b/src/ESP_FlexyStepper.cpp index ece2b54..fc938a2 100644 --- a/src/ESP_FlexyStepper.cpp +++ b/src/ESP_FlexyStepper.cpp @@ -1025,6 +1025,10 @@ void ESP_FlexyStepper::setTargetPositionToStop() this->isOnWayToHome = false; this->isOnWayToLimit = false; +in setTargetPositionToStop if(directionOfMotion == 0){ + return; + } + long decelerationDistance_InSteps; //