pmac Enable PV successfully tested

This commit is contained in:
Michele Brambilla
2022-03-07 16:40:46 +01:00
committed by brambilla_m
parent fbf2331a05
commit 403eecafae
4 changed files with 26 additions and 19 deletions

View File

@@ -858,23 +858,25 @@ asynStatus pmacV3Controller::readInt32(asynUser *pasynUser, epicsInt32 *value) {
int function = pasynUser->reason;
asynStatus status = asynError;
pmacAxis *pAxis = NULL;
static const char *functionName = "pmacController::readInt32";
char command[this->PMAC_MAXBUF_];
char response[this->PMAC_MAXBUF_];
pmacV3Axis *pAxis = NULL;
static const char *functionName = "pmacV3Controller::readInt32";
char command[128];
char response[128];
debugFlow(functionName);
pAxis = this->getAxis(pasynUser);
pAxis = (pmacV3Axis*)(this->getAxis(pasynUser));
if (!pAxis) {
return asynError;
}
if (function == axisState_) {
snprintf(command, sizeof(command), "P%2.2d00", pAxis->axisNo_);
status = this->lowLevelWriteRead(axisNo_, command, response);
status = this->lowLevelWriteRead(pAxis->axisNo_, command, response);
*value = strtol(response, NULL, 10);
setIntegerParam(pAxis->axisState_, value);
return status
setIntegerParam(axisState_, *value);
callParamCallbacks();
return status;
}
return pmacController::readInt32(pasynUser, value);
}