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

This commit is contained in:
2025-05-13 14:46:13 +02:00
parent cd57409f3c
commit a56a8cf646

View File

@@ -1035,8 +1035,6 @@ asynStatus masterMacsAxis::enable(bool on) {
// Status of parameter library operations // Status of parameter library operations
asynStatus pl_status = asynSuccess; asynStatus pl_status = asynSuccess;
bool moving = false;
// ========================================================================= // =========================================================================
/* /*
@@ -1046,6 +1044,13 @@ asynStatus masterMacsAxis::enable(bool on) {
*/ */
targetReachedUninitialized_ = true; 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); doPoll(&moving);
// If the axis is currently moving, it cannot be disabled. Ignore the // If the axis is currently moving, it cannot be disabled. Ignore the