Merge pull request #143 from TimEvWw/master

Express board coord fix
master
Tim Evers 2020-04-27 21:27:22 +02:00 committed by GitHub
commit 0a8e4d452b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 5 deletions

View File

@ -1546,17 +1546,21 @@ void Movement::checkAxisVsEncoder(MovementAxis *axis, MovementEncoder *encoder,
(*missedSteps)++; (*missedSteps)++;
axis->setCurrentPosition(*lastPosition); //axis->setCurrentPosition(*lastPosition);
} }
else { //else {
// // Decrease amount of missed steps if there are no missed step // // Decrease amount of missed steps if there are no missed step
// if (*missedSteps > 0) // if (*missedSteps > 0)
// { // {
// (*missedSteps) -= (*encoderStepDecay); // (*missedSteps) -= (*encoderStepDecay);
// } // }
// *lastPosition = axis->currentPosition();
// encoder->setPosition(axis->currentPosition());
//}
*lastPosition = axis->currentPosition(); *lastPosition = axis->currentPosition();
encoder->setPosition(axis->currentPosition()); encoder->setPosition(axis->currentPosition());
}
} }
// //