Stepper: rework resume functionality

This commit is contained in:
jonny_ji7
2023-03-13 20:02:22 +01:00
parent 0a05340763
commit dc6deeb3d0
2 changed files with 39 additions and 39 deletions

View File

@@ -71,10 +71,10 @@ void travelSteps(int stepsTarget){
while (stepsToGo != 0){
//--- wait if direction changed ---
if (dirPrev != dir){
ESP_LOGW(TAG, " dir-change detected - waiting for move to finish \n ");
while(step.getState() != 1) vTaskDelay(1); //wait for move to finish
}
//if (dirPrev != dir){
// ESP_LOGW(TAG, " dir-change detected - waiting for move to finish \n ");
// while(step.getState() != 1) vTaskDelay(1); //wait for move to finish
//}
//--- currently moving right ---
if (stepp_direction == true){ //currently moving right