From 542abcbaad9dbd267114e6516d71a05200410c88 Mon Sep 17 00:00:00 2001 From: Michele Brambilla Date: Wed, 2 Mar 2022 06:37:33 +0100 Subject: [PATCH] pmac improve handling of the error message --- sinqEPICSApp/src/pmacAxis.cpp | 4 ++-- sinqEPICSApp/src/pmacController.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sinqEPICSApp/src/pmacAxis.cpp b/sinqEPICSApp/src/pmacAxis.cpp index 56af745..6e3d611 100644 --- a/sinqEPICSApp/src/pmacAxis.cpp +++ b/sinqEPICSApp/src/pmacAxis.cpp @@ -319,7 +319,7 @@ static char *translateAxisError(int axErr) { switch(axErr){ case 0: - return strdup("no error"); + return strdup(""); break; case 1: return strdup("limit violation"); @@ -537,7 +537,7 @@ asynStatus pmacAxis::getAxisStatus(bool *moving) setIntegerParam(pC_->motorStatusFollowingError_,false); } /* Set any axis specific general problem bits. */ - if (axStat < 0 || axErr != 0) { + if (axErr != 0) { axisProblemFlag = 1; if(axisErrorCount < 10){ axMessage = translateAxisError(axErr); diff --git a/sinqEPICSApp/src/pmacController.cpp b/sinqEPICSApp/src/pmacController.cpp index 55deb11..34abe89 100644 --- a/sinqEPICSApp/src/pmacController.cpp +++ b/sinqEPICSApp/src/pmacController.cpp @@ -414,6 +414,7 @@ asynStatus pmacController::writeFloat64(asynUser *pasynUser, epicsFloat64 value) // bool moving = true; // pAxis->getAxisStatus(&moving); // } else + /* if (function == motorLowLimit_) { sprintf(command, "I%d14=%d", pAxis->axisNo_, (int)(value/pAxis->scale_/MULT)); asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, @@ -430,6 +431,7 @@ asynStatus pmacController::writeFloat64(asynUser *pasynUser, epicsFloat64 value) if (command[0] != 0 && status == asynSuccess) { status = lowLevelWriteRead(pAxis->axisNo_,command, response); } + */ //Call base class method //This will handle callCallbacks even if the function was handled here.