From 7b8c4db43e7e9d7565991acdbfe4c8d5ab0f2480 Mon Sep 17 00:00:00 2001 From: smathis Date: Fri, 13 Feb 2026 09:25:27 +0100 Subject: [PATCH] Added small docstring to motorVelocity explaining an important caveat. --- src/sinqController.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sinqController.h b/src/sinqController.h index 022c738..bbb52af 100644 --- a/src/sinqController.h +++ b/src/sinqController.h @@ -267,6 +267,19 @@ class HIDDEN sinqController : public asynMotorController { int motorMoveVel() { return motorMoveVel_; } int motorHome() { return motorHome_; } int motorStop() { return motorStop_; } + + /** + * @brief Index for the paramLib entry which writes the motor speed in steps + * / s into the RVEL field of the motor record. + * + * Important: Only write to this field if the motor is moving. As discussed + * here: https://github.com/epics-modules/motor/pull/236, otherwise a race + * condition might occur and the move or moveVelocity might be called with + * the readback velocity instead of that written into the VELO / JVEL + * fields. + * + * @return int + */ int motorVelocity() { return motorVelocity_; } int motorVelBase() { return motorVelBase_; } int motorAccel() { return motorAccel_; }