Discard all remaining planned blocks with AbortPlannedMoves

Previously it looked like only the active block has been discarded
which worked most of the time, since we only planned single moves.
But with introduction of PlanLongMove in one of the last commits
this is not true anymore.
pull/136/head
D.R.racer 2021-11-04 11:14:03 +01:00
parent 1a5be13948
commit 29a4274054
1 changed files with 2 additions and 1 deletions

View File

@ -154,7 +154,8 @@ void PulseGen::AbortPlannedMoves(bool halt) {
if (current_block) {
last_rate = acc_step_rate;
current_block = nullptr;
block_index.pop();
while (!block_index.empty()) // drop all remaining blocks
block_index.pop();
}
// truncate the last rate if halting