From d74aa242a480dc72616e41d7d2ec085e05b55662 Mon Sep 17 00:00:00 2001 From: Peter Denison Date: Fri, 7 Jul 2006 20:50:19 +0000 Subject: [PATCH] Fix "brown paper bag" bug that caused position updates to go to all axes --- motorApp/MotorSrc/drvMotorAsyn.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/motorApp/MotorSrc/drvMotorAsyn.c b/motorApp/MotorSrc/drvMotorAsyn.c index a84ee831..b6895049 100644 --- a/motorApp/MotorSrc/drvMotorAsyn.c +++ b/motorApp/MotorSrc/drvMotorAsyn.c @@ -19,9 +19,9 @@ * of this distribution. * ************************************************************************ * - * Version: $Revision: 1.10 $ + * Version: $Revision: 1.11 $ * Modified by: $Author: peterd $ - * Last Modified: $Date: 2006-07-01 20:08:56 $ + * Last Modified: $Date: 2006-07-07 20:50:19 $ * * Original Author: Peter Denison * Current Author: Peter Denison @@ -737,10 +737,13 @@ static void intCallback(void *axisPvt, unsigned int nChanged, pnode = (interruptNode *)ellFirst(pclientList); while (pnode) { asynMotorStatusInterrupt *pmotorStatusInterrupt = pnode->drvPvt; + addr = pmotorStatusInterrupt->addr; reason = pmotorStatusInterrupt->pasynUser->reason; - pmotorStatusInterrupt->callback(pmotorStatusInterrupt->userPvt, - pmotorStatusInterrupt->pasynUser, - &pAxis->status ); + if (addr == pAxis->num) { + pmotorStatusInterrupt->callback(pmotorStatusInterrupt->userPvt, + pmotorStatusInterrupt->pasynUser, + &pAxis->status ); + } pnode = (interruptNode *)ellNext(&pnode->node); } pasynManager->interruptEnd(pPvt->motorStatusInterruptPvt);