Merge pull request #180 from EuropeanSpallationSource/reset-ueip-if-no-encoder-present

motorRecord: Reset UEIP to No if no encoder is present
This commit is contained in:
Kevin Peterson
2021-11-18 13:25:25 -06:00
committed by GitHub
+6
View File
@@ -3633,6 +3633,12 @@ static void process_motor_info(motorRecord * pmr, bool initcall)
/* Calculate raw and dial readback values. */
msta.All = pmr->msta;
if ((pmr->ueip == motorUEIP_Yes) && (!(msta.Bits.EA_PRESENT)))
{
pmr->ueip = motorUEIP_No;
db_post_events(pmr, &pmr->urip, DBE_VAL_LOG);
}
if (pmr->ueip == motorUEIP_Yes)
{
/* An encoder is present and the user wants us to use it. */