Fix unit tests for AbortPlannedMoves(axis)

pull/120/head
D.R.racer 2021-09-07 14:59:55 +02:00 committed by DRracer
parent a6800d491d
commit 37ff9b8a8f
1 changed files with 5 additions and 1 deletions

View File

@ -71,10 +71,14 @@ bool Motion::QueueEmpty(Axis axis) const {
void Motion::AbortPlannedMoves(bool halt) { void Motion::AbortPlannedMoves(bool halt) {
for (uint8_t i = 0; i < 3; ++i) { for (uint8_t i = 0; i < 3; ++i) {
axes[i].targetPos = axes[i].pos; // leave the axis where it was at the time of abort AbortPlannedMoves((config::Axis)i, halt); // leave the axis where it was at the time of abort
} }
} }
void Motion::AbortPlannedMoves(config::Axis i, bool) {
axes[i].targetPos = axes[i].pos; // leave the axis where it was at the time of abort
}
void ReinitMotion() { void ReinitMotion() {
// reset the simulation data to defaults // reset the simulation data to defaults
axes[0] = AxisSim({ 0, 0, false, false, false }); // pulley axes[0] = AxisSim({ 0, 0, false, false, false }); // pulley