diff --git a/src/masterMacsAxis.cpp b/src/masterMacsAxis.cpp index 65f1d9d..0545958 100644 --- a/src/masterMacsAxis.cpp +++ b/src/masterMacsAxis.cpp @@ -1035,8 +1035,6 @@ asynStatus masterMacsAxis::enable(bool on) { // Status of parameter library operations asynStatus pl_status = asynSuccess; - bool moving = false; - // ========================================================================= /* @@ -1046,6 +1044,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