pmac improve handling of the error message

This commit is contained in:
Michele Brambilla
2022-03-02 06:37:33 +01:00
parent efbd0e19cf
commit 542abcbaad
2 changed files with 4 additions and 2 deletions

View File

@ -319,7 +319,7 @@ static char *translateAxisError(int axErr)
{ {
switch(axErr){ switch(axErr){
case 0: case 0:
return strdup("no error"); return strdup("");
break; break;
case 1: case 1:
return strdup("limit violation"); return strdup("limit violation");
@ -537,7 +537,7 @@ asynStatus pmacAxis::getAxisStatus(bool *moving)
setIntegerParam(pC_->motorStatusFollowingError_,false); setIntegerParam(pC_->motorStatusFollowingError_,false);
} }
/* Set any axis specific general problem bits. */ /* Set any axis specific general problem bits. */
if (axStat < 0 || axErr != 0) { if (axErr != 0) {
axisProblemFlag = 1; axisProblemFlag = 1;
if(axisErrorCount < 10){ if(axisErrorCount < 10){
axMessage = translateAxisError(axErr); axMessage = translateAxisError(axErr);

View File

@ -414,6 +414,7 @@ asynStatus pmacController::writeFloat64(asynUser *pasynUser, epicsFloat64 value)
// bool moving = true; // bool moving = true;
// pAxis->getAxisStatus(&moving); // pAxis->getAxisStatus(&moving);
// } else // } else
/*
if (function == motorLowLimit_) { if (function == motorLowLimit_) {
sprintf(command, "I%d14=%d", pAxis->axisNo_, (int)(value/pAxis->scale_/MULT)); sprintf(command, "I%d14=%d", pAxis->axisNo_, (int)(value/pAxis->scale_/MULT));
asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW, asynPrint(this->pasynUserSelf, ASYN_TRACE_FLOW,
@ -430,6 +431,7 @@ asynStatus pmacController::writeFloat64(asynUser *pasynUser, epicsFloat64 value)
if (command[0] != 0 && status == asynSuccess) { if (command[0] != 0 && status == asynSuccess) {
status = lowLevelWriteRead(pAxis->axisNo_,command, response); status = lowLevelWriteRead(pAxis->axisNo_,command, response);
} }
*/
//Call base class method //Call base class method
//This will handle callCallbacks even if the function was handled here. //This will handle callCallbacks even if the function was handled here.