From 990cb293bdc04c6a576b860a541ba269ea77f897 Mon Sep 17 00:00:00 2001 From: Luca Toniolo <10792599+grandixximo@users.noreply.github.com> Date: Sat, 16 May 2026 18:31:26 +0800 Subject: [PATCH] task: set io.status=DONE on emcIoAbort to unblock tool-change abort After commit 764655eb4d 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 --- src/emc/task/taskclass.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/emc/task/taskclass.cc b/src/emc/task/taskclass.cc index 3bc6b4fe21e..c484e5a9860 100644 --- a/src/emc/task/taskclass.cc +++ b/src/emc/task/taskclass.cc @@ -369,6 +369,9 @@ int Task::emcIoAbort(EMC_ABORT /*reason*/)//EMC_TOOL_ABORT_TYPE iocontrol_data.coolant_flood = 0; /* coolant flood output pin */ iocontrol_data.tool_change = 0; /* abort tool change if in progress */ iocontrol_data.tool_prepare = 0; /* abort tool prepare if in progress */ + // release task wait on pending tool-change/prepare (old NML iocontrol + // returned RCS_DONE by default; in-process call must do it explicitly) + emcioStatus.status = RCS_STATUS::DONE; return 0; }