From 8fae7bebb032805ce6827dbf2ea91810151549c2 Mon Sep 17 00:00:00 2001 From: MarkRivers Date: Thu, 6 Apr 2006 19:39:09 +0000 Subject: [PATCH] Fix from Peter Denison for jog --- motorApp/MotorSrc/devMotorAsyn.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/motorApp/MotorSrc/devMotorAsyn.c b/motorApp/MotorSrc/devMotorAsyn.c index e95ddfb3..811a9ae3 100644 --- a/motorApp/MotorSrc/devMotorAsyn.c +++ b/motorApp/MotorSrc/devMotorAsyn.c @@ -292,7 +292,9 @@ static RTN_STATUS build_trans( motor_cmnd command, pmsg->command = pPvt->move_cmd; pmsg->dvalue = pPvt->param; pPvt->move_cmd = -1; - pPvt->needUpdate = 1; + /* Do we need to set needUpdate and schedule a process here? */ + /* or can we always guarantee to get at least one callback? */ + /* Do we really need the callback? I assume so */ break; case SET_ENC_RATIO: pmsg->command = motorEncRatio; @@ -340,6 +342,8 @@ static RTN_STATUS build_trans( motor_cmnd command, case GET_INFO: pmsg->command = motorStatus; pmsg->interface = float64ArrayType; + /* Check this - needUpdate can cause the callback mechanism to get + stuck. Must ensure that the record will be processed after this */ pPvt->needUpdate = 1; break; default: