3 Commits

Author SHA1 Message Date
mathis_s f60f3785c5 Fixed some compile-time warnings
Test And Build / Lint (push) Failing after 3s
Test And Build / Build (push) Successful in 9s
2025-12-23 12:06:29 +01:00
mathis_s 72e2529ab5 Updated sinqMotor to fix segfault 2025-12-23 12:02:04 +01:00
mathis_s ae90b5cbe6 Added handling of unknown encoder type
Test And Build / Lint (push) Failing after 10s
Test And Build / Build (push) Successful in 14s
2025-12-05 08:27:03 +01:00
3 changed files with 13 additions and 5 deletions
+8
View File
@@ -681,6 +681,14 @@ asynStatus el734Axis::readEncoderType() {
case 4:
setAxisParamChecked(this, encoderType, AbsoluteEncoder);
break;
default:
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d\nUnknown encoder "
"type %d. Please call the support.\n",
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
encoder_type);
setAxisParamChecked(this, motorStatusProblem, true);
return asynError;
}
return asynSuccess;
}
+4 -4
View File
@@ -36,6 +36,7 @@ el734Controller::el734Controller(const char *portName,
pEl734C_(std::make_unique<el734ControllerImpl>((el734ControllerImpl){
.comTimeout = comTimeout,
.lastResponse = {0},
.pasynInt32SyncIOipPort = nullptr,
.limFromHardware = 0,
}))
@@ -127,10 +128,8 @@ asynStatus el734Controller::writeRead(int axisNo, const char *command,
// Definition of local variables.
asynStatus status = asynSuccess;
asynStatus timeoutStatus = asynSuccess;
char drvMessageText[MAXBUF_] = {0};
int motorStatusProblem = 0;
int numReceivedResponses = 0;
/*
asyn defines the following reasons for an end-of-message coming from the MCU
@@ -354,8 +353,9 @@ static const iocshArg CreateControllerArg5 = {"Communication timeout (s)",
static const iocshArg *const CreateControllerArgs[] = {
&CreateControllerArg0, &CreateControllerArg1, &CreateControllerArg2,
&CreateControllerArg3, &CreateControllerArg4, &CreateControllerArg5};
static const iocshFuncDef configEl734CreateController = {"el734Controller", 6,
CreateControllerArgs};
static const iocshFuncDef configEl734CreateController = {
"el734Controller", 6, CreateControllerArgs,
"Create a new instance of an EL734 controller."};
static void configEl734CreateControllerCallFunc(const iocshArgBuf *args) {
el734CreateController(args[0].sval, args[1].sval, args[2].ival,
args[3].dval, args[4].dval, args[5].dval);