Skip to content

Commit 990cb29

Browse files
committed
task: set io.status=DONE on emcIoAbort to unblock tool-change abort
After commit 764655e moved IO handling from the out-of-process iocontrol into Task, EMC_TOOL_ABORT no longer flips emcioStatus.status back to RCS_DONE. The old NML dispatcher set RCS_DONE by default for every command; the new in-process emcIoAbort cleared the tool_change and tool_prepare pins but left status stuck at RCS_EXEC from the prior emcToolLoad/emcToolPrepare call. emctaskmain's MDI, auto and state-restore paths gate on io.status == RCS_DONE, so an abort received while tool-change was pending wedged the UI and prevented further MDI or program runs. Closes #3675
1 parent 824aa33 commit 990cb29

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/emc/task/taskclass.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ int Task::emcIoAbort(EMC_ABORT /*reason*/)//EMC_TOOL_ABORT_TYPE
369369
iocontrol_data.coolant_flood = 0; /* coolant flood output pin */
370370
iocontrol_data.tool_change = 0; /* abort tool change if in progress */
371371
iocontrol_data.tool_prepare = 0; /* abort tool prepare if in progress */
372+
// release task wait on pending tool-change/prepare (old NML iocontrol
373+
// returned RCS_DONE by default; in-process call must do it explicitly)
374+
emcioStatus.status = RCS_STATUS::DONE;
372375
return 0;
373376
}
374377

0 commit comments

Comments
 (0)