Skip to content

Commit

Permalink
fixed issue with setTargetPositionToStop function
Browse files Browse the repository at this point in the history
  • Loading branch information
pkerspe committed Aug 3, 2020
1 parent 569a54b commit ee8dc13
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/ESP_FlexyStepper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,10 @@ void ESP_FlexyStepper::setTargetPositionToStop()
this->isOnWayToHome = false;
this->isOnWayToLimit = false;

in setTargetPositionToStop if(directionOfMotion == 0){
return;
}

long decelerationDistance_InSteps;

//
Expand Down

0 comments on commit ee8dc13

Please sign in to comment.