From ee511df56f6ca28bedbb8781e278d5b337717dc8 Mon Sep 17 00:00:00 2001 From: Ron Sluiter Date: Wed, 16 Aug 2000 19:04:39 +0000 Subject: [PATCH] - Fix for record hanging because of erroneous retries; see README item #20. --- motorApp/MotorSrc/motorRecord.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/motorApp/MotorSrc/motorRecord.c b/motorApp/MotorSrc/motorRecord.c index 88e482ca..cd89e8f4 100644 --- a/motorApp/MotorSrc/motorRecord.c +++ b/motorApp/MotorSrc/motorRecord.c @@ -2,9 +2,9 @@ FILENAME... motorRecord.c USAGE... Record Support Routines for the Motor record. -Version: $Revision: 1.4 $ +Version: $Revision: 1.5 $ Modified By: $Author: sluiter $ -Last Modified: $Date: 2000-07-25 20:34:50 $ +Last Modified: $Date: 2000-08-16 19:04:39 $ */ /* @@ -1343,8 +1343,15 @@ LOGIC: NORMAL RETURN. ELSE Calculate.... - IF last dial commanded position = current dial feedback position. - NORMAL RETURN. + + IF new raw commanded position = current raw feedback position. + IF not done moving, AND, [either no motion-in-progress, OR, + retry-in-progress]. + Set done moving TRUE. + NORMAL RETURN. + NOTE: maybeRetry() can send control here even though the + move is to the same raw position. + ENDIF ENDIF .... .... @@ -1806,10 +1813,15 @@ stop_all: /* Cancel any operations. */ npos = NINT(newpos); if (npos == rpos) { - if (pmr->dmov == FALSE && pmr->mip == 0) + if (pmr->dmov == FALSE && (pmr->mip == 0 || pmr->mip == MIP_RETRY)) { pmr->dmov = TRUE; MARK(M_DMOV); + if (pmr->mip != 0) + { + pmr->mip = 0; + MARK(M_MIP); + } } return(OK); }