From 8a4fe8fa0c9bf3092d6dd532eb9b4c9b0260d468 Mon Sep 17 00:00:00 2001 From: timmmooney Date: Tue, 4 Feb 2014 22:49:55 +0000 Subject: [PATCH] abort was broken, left motor not knowing where it was. --- motorApp/OmsSrc/MAX_trajectoryScan.st | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/motorApp/OmsSrc/MAX_trajectoryScan.st b/motorApp/OmsSrc/MAX_trajectoryScan.st index a2ce2d30..f38cd2b4 100644 --- a/motorApp/OmsSrc/MAX_trajectoryScan.st +++ b/motorApp/OmsSrc/MAX_trajectoryScan.st @@ -572,8 +572,26 @@ ss maxTrajectoryScan { when (execStatus == STATUS_ABORT) { /* The trajectory_abort state set has detected an abort. It has - * already posted the status and message. Don't execute flyback - * return to top */ + * already posted the status and message. Tell the motors where + * they are. */ + if (debugLevel) printf("\nabort\n"); + pvPut(elapsedTime); + pvPut(execStatus); + pvPut(execMessage); + /* Get the current motor positions, post them */ + %%getMotorPositions(ssId, pVar, pVar->motorCurrent, pVar->motorCurrentRaw, &(pVar->dtime)); + for (j=0; j