Reduced output from MasterMacsDriver
This commit is contained in:
@ -28,6 +28,8 @@
|
||||
#define CHECK_BIT(var,pos) ((var) & (1 << pos))
|
||||
#define ABS(x) (x < 0 ? -(x) : (x))
|
||||
|
||||
#define debug 0
|
||||
|
||||
/** Creates a new MasterMACSController object.
|
||||
* \param[in] portName The name of the asyn port that will be created for this driver
|
||||
* \param[in] MasterMACSPortName The name of the drvAsynSerialPort that was created previously to connect to the MasterMACS controller
|
||||
@ -187,13 +189,13 @@ asynStatus
|
||||
free(mmacsData);
|
||||
|
||||
/* format and print the response in hex for debugging purposes */
|
||||
/*
|
||||
if(debug) {
|
||||
for(i = 0, idx = 0; i < in; i++){
|
||||
sprintf(hexResponse + idx, "%02x ", (unsigned int)mmacsResponse[i]);
|
||||
idx = strlen(hexResponse);
|
||||
}
|
||||
errlogSevPrintf(errlogMajor,"Reply in hex: %s\n", hexResponse);
|
||||
*/
|
||||
}
|
||||
|
||||
/* Here we have read the data from the MasterMACS. We proceed to extract
|
||||
* the payload and the state of the ACK byte and place that reply into data
|
||||
@ -234,8 +236,9 @@ asynStatus
|
||||
lenPayload = idx - 4;
|
||||
memcpy(reply + 4, mmacsResponse + 4, lenPayload);
|
||||
reply[4 + lenPayload] = (char) 0;
|
||||
errlogSevPrintf(errlogMajor, "Completed reply at end of transactController: %s ", reply);
|
||||
|
||||
if(debug) {
|
||||
errlogSevPrintf(errlogMajor, "Completed reply at end of transactController: %s ", reply);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -261,7 +264,7 @@ asynStatus
|
||||
|
||||
if (function == enableAxis_) {
|
||||
/*
|
||||
* Read the status in order to prevent execssiove commands
|
||||
* Read the status in order to prevent execssive commands
|
||||
*/
|
||||
devStatus = pAxis->readStatus();
|
||||
if(devStatus < 900){
|
||||
@ -606,8 +609,10 @@ asynStatus MasterMACSAxis::poll(bool * moving)
|
||||
goto skip;
|
||||
}
|
||||
|
||||
errlogPrintf("Axis %d, position %lf, devStatus %d\n", axisNo_,
|
||||
position, devStatus);
|
||||
if(debug) {
|
||||
errlogPrintf("Axis %d, position %lf, devStatus %d\n", axisNo_,
|
||||
position, devStatus);
|
||||
}
|
||||
|
||||
if (!isOn(devStatus)) {
|
||||
setIntegerParam(pC_->motorStatusProblem_, true);
|
||||
@ -693,8 +698,10 @@ asynStatus MasterMACSAxis::poll(bool * moving)
|
||||
sscanf(pPtr + 1, "%f", &errStatus);
|
||||
derCode = (unsigned int) errStatus;
|
||||
|
||||
errlogPrintf("Axis %d, errCode(R11) %d, derCode(R18) %d\n", axisNo_,
|
||||
if(debug) {
|
||||
errlogPrintf("Axis %d, errCode(R11) %d, derCode(R18) %d\n", axisNo_,
|
||||
errCode, derCode);
|
||||
}
|
||||
|
||||
setIntegerParam(pC_->motorStatusProblem_, true);
|
||||
if (errCode == 0) {
|
||||
|
Reference in New Issue
Block a user