Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/emc/task/emctaskmain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,18 @@ void readahead_reading(void)
int count = 0;
interpret_again:
if (emcTaskPlanIsWait()) {
// delay reading of next line until all is done
// delay reading of next line until all is done.
// Match the stricter check used by mdi_execute_hook:
// trusting only execState==DONE can race when motion
// hasn't yet processed a just-issued command (e.g. a
// G38 probe), letting the next read see a non-empty
// queue.
if (interp_list.len() == 0 &&
emcTaskCommand == 0 &&
emcStatus->task.execState ==
EMC_TASK_EXEC::DONE) {
EMC_TASK_EXEC::DONE &&
emcStatus->motion.traj.queue == 0 &&
emcStatus->io.status == RCS_STATUS::DONE) {
emcTaskPlanClearWait();
}
} else {
Expand Down
Loading