Added explanation why the return status of doPoll is not used in the

enable function.
This commit is contained in:
2025-05-13 14:44:49 +02:00
parent 2e42cbc6da
commit 9cc9b1d144

View File

@ -1045,8 +1045,6 @@ asynStatus masterMacsAxis::enable(bool on) {
// Status of parameter library operations
asynStatus pl_status = asynSuccess;
bool moving = false;
// =========================================================================
/*
@ -1056,6 +1054,13 @@ asynStatus masterMacsAxis::enable(bool on) {
*/
targetReachedUninitialized_ = true;
/*
Continue regardless of the status returned by the poll; we just want to
find out whether the motor is currently moving or not. If the poll
function fails before it can determine that, it is assumed that the motor
is not moving.
*/
bool moving = false;
doPoll(&moving);
// If the axis is currently moving, it cannot be disabled. Ignore the