forked from epics_driver_modules/motorBase
motor: changed the logic for setting the encoder ratio parameter so that it is always set if there is an encoder present. Previously the ratio was set if one was present AND we are using it, which didn't work when switching between different UEIP modes and setting the controller position at the same time.
This commit is contained in:
@@ -1775,7 +1775,7 @@ static RTN_STATUS do_work(motorRecord * pmr, CALLBACK_VALUE proc_ind)
|
||||
|
||||
/* Set the encoder ratio. Note this is blatantly device dependent. */
|
||||
msta.All = pmr->msta;
|
||||
if (msta.Bits.EA_PRESENT && pmr->ueip)
|
||||
if (msta.Bits.EA_PRESENT)
|
||||
{
|
||||
/* defend against divide by zero */
|
||||
if (fabs(pmr->mres) < 1.e-9)
|
||||
|
||||
Reference in New Issue
Block a user