epics-motor / motorPIGCS2

EPICS asyn motor drivers for PI GCS2 controllers
2 stars 4 forks source link

Closed-loop logic breaks writeFloat64 #14

Closed kmpeters closed 1 year ago

kmpeters commented 1 year ago

Pull request #10 introduced a bug that only allowed the first nine non-closed-loop parameters to be written:

https://github.com/epics-motor/motorPIGCS2/blob/e48ca00233357efdb6da7e539192788d20d075cd/pigcs2App/src/PIasynController.cpp#L332

The assumption that the closed-loop parameters are the first nine parameters is incorrect.

kmpeters commented 1 year ago

The assumption that the closed-loop parameters are the first nine parameters is incorrect.

The actual problem is that the logic of the if statement needs to be changed from < to >=, because cl_iter is less than PIGCS2_CL_PARAM_QTT for closed-loop parameters.