Added axis reinitialization after node reset

When resetting the node, values within the controller may change, which
need to be reread by the init function.
This commit is contained in:
2025-08-05 08:58:50 +02:00
parent 83f9be3be8
commit ff183576ec

View File

@@ -814,8 +814,9 @@ asynStatus masterMacsAxis::doReset() {
setAxisParamChecked(this, motorStatusProblem, true); setAxisParamChecked(this, motorStatusProblem, true);
} }
// Reset any errors in the controller // Reset any errors in the controller. Since the node reset results in a
status = pC_->write(axisNo_, 17, ""); // power cycle, we use the corresponding timeout.
status = pC_->write(axisNo_, 17, "", PowerCycleTimeout);
if (status != asynSuccess) { if (status != asynSuccess) {
setAxisParamChecked(this, motorStatusProblem, true); setAxisParamChecked(this, motorStatusProblem, true);
} }
@@ -823,7 +824,13 @@ asynStatus masterMacsAxis::doReset() {
// Move out of the handshake wait loop, if we're currently inside it. // Move out of the handshake wait loop, if we're currently inside it.
pMasterMacsA_->waitForHandshake = false; pMasterMacsA_->waitForHandshake = false;
return status; // Reinitialize the axis
status = masterMacsAxis::init();
if (status != asynSuccess) {
return status;
}
bool moving = false;
return forcedPoll(&moving);
} }
/* /*