diff --git a/src/modules/pulse_gen.cpp b/src/modules/pulse_gen.cpp index d673d9d..4d85b21 100644 --- a/src/modules/pulse_gen.cpp +++ b/src/modules/pulse_gen.cpp @@ -160,10 +160,12 @@ void PulseGen::AbortPlannedMoves(bool halt) { if (current_block) { last_rate = acc_step_rate; current_block = nullptr; - while (!block_index.empty()) // drop all remaining blocks - block_index.pop(); } + // drop all remaining blocks + while (!block_index.empty()) + block_index.pop(); + // truncate the last rate if halting if (halt) last_rate = 0;