From 3e7dec3a8deebaf64cffb1e419e6f918fb3e004a Mon Sep 17 00:00:00 2001 From: mp49 Date: Fri, 20 May 2011 16:11:06 +0000 Subject: [PATCH] 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. --- motorApp/MotorSrc/motorRecord.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motorApp/MotorSrc/motorRecord.cc b/motorApp/MotorSrc/motorRecord.cc index 4d1f6542..eb963577 100644 --- a/motorApp/MotorSrc/motorRecord.cc +++ b/motorApp/MotorSrc/motorRecord.cc @@ -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)