Fixed CI pipeline issues.
This commit is contained in:
@ -95,7 +95,6 @@ asynStatus sinqAxis::doPoll(bool *moving) { return asynSuccess; }
|
||||
asynStatus sinqAxis::move(double position, int relative, double minVelocity,
|
||||
double maxVelocity, double acceleration) {
|
||||
|
||||
double motorRecResolution = 0.0;
|
||||
double target_position = 0.0;
|
||||
|
||||
// Status of parameter library operations
|
||||
@ -148,7 +147,6 @@ asynStatus sinqAxis::movementTimeoutWatchdog(bool moving) {
|
||||
// These parameters are only needed in this branch
|
||||
double motorPosition = 0.0;
|
||||
double motorTargetPosition = 0.0;
|
||||
double motorRecResolution = 0.0;
|
||||
double motorVelBase = 0.0;
|
||||
double motorAccel = 0.0;
|
||||
time_t timeContSpeed = 0;
|
||||
|
@ -81,11 +81,13 @@ class epicsShareClass sinqAxis : public asynMotorAxis {
|
||||
// Setter for offsetMovTimeout
|
||||
asynStatus setOffsetMovTimeout(time_t offsetMovTimeout) {
|
||||
offsetMovTimeout_ = offsetMovTimeout;
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
// Setter for scaleMovTimeout
|
||||
asynStatus setScaleMovTimeout(time_t scaleMovTimeout) {
|
||||
scaleMovTimeout_ = scaleMovTimeout;
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
friend class sinqController;
|
||||
|
@ -124,6 +124,9 @@ const char *sinqController::stringifyAsynStatus(asynStatus status) {
|
||||
// and
|
||||
// https://github.com/epics-modules/asyn/blob/master/asyn/asynPortDriver/paramErrors.h
|
||||
// for the definition of the error codes
|
||||
// The pragma is necessary since the param lib error codes are "tacked on"
|
||||
// the enum, which results in compiler warnings otherwise.
|
||||
#pragma GCC diagnostic ignored "-Wswitch"
|
||||
switch (status) {
|
||||
case asynSuccess:
|
||||
return asynSuccessStringified;
|
||||
@ -151,9 +154,12 @@ const char *sinqController::stringifyAsynStatus(asynStatus status) {
|
||||
return asynParamInvalidListStringified;
|
||||
}
|
||||
|
||||
errlogPrintf("%s => line %d:\nReached unreachable code.",
|
||||
__PRETTY_FUNCTION__, __LINE__);
|
||||
return "unreachable code reached";
|
||||
asynPrint(
|
||||
pasynUserSelf, ASYN_TRACE_ERROR,
|
||||
"%s => line %d:\nInput did not match any variant of asynStatus.\n",
|
||||
__PRETTY_FUNCTION__, __LINE__);
|
||||
|
||||
return "Input did not match any variant of asynStatus";
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
@ -174,9 +180,9 @@ asynStatus setOffsetMovTimeout(const char *portName, int axisNo,
|
||||
asynMotorAxis *asynAxis = pC->getAxis(axisNo);
|
||||
sinqAxis *axis = dynamic_cast<sinqAxis *>(asynAxis);
|
||||
if (axis == nullptr) {
|
||||
errlogPrintf("%s => line %d:\nPAxis %d does not exist or is not an "
|
||||
errlogPrintf("%s => line %d:\nAxis %d does not exist or is not an "
|
||||
"instance of sinqAxis.",
|
||||
__PRETTY_FUNCTION__, __LINE__, portName, axisNo);
|
||||
__PRETTY_FUNCTION__, __LINE__, axisNo);
|
||||
}
|
||||
|
||||
return axis->setOffsetMovTimeout(offsetMovTimeout);
|
||||
@ -213,9 +219,9 @@ asynStatus setScaleMovTimeout(const char *portName, int axisNo,
|
||||
asynMotorAxis *asynAxis = pC->getAxis(axisNo);
|
||||
sinqAxis *axis = dynamic_cast<sinqAxis *>(asynAxis);
|
||||
if (axis == nullptr) {
|
||||
errlogPrintf("%s => line %d:\nPAxis %d does not exist or is not an "
|
||||
errlogPrintf("%s => line %d:\nAxis %d does not exist or is not an "
|
||||
"instance of sinqAxis.",
|
||||
__PRETTY_FUNCTION__, __LINE__, portName, axisNo);
|
||||
__PRETTY_FUNCTION__, __LINE__, axisNo);
|
||||
}
|
||||
|
||||
return axis->setScaleMovTimeout(scaleMovTimeout);
|
||||
@ -237,7 +243,7 @@ static void setScaleMovTimeoutCallFunc(const iocshArgBuf *args) {
|
||||
|
||||
static void sinqControllerRegister(void) {
|
||||
iocshRegister(&setOffsetMovTimeoutDef, setOffsetMovTimeoutCallFunc);
|
||||
iocshRegister(&setOffsetMovTimeoutDef, setOffsetMovTimeoutCallFunc);
|
||||
iocshRegister(&setScaleMovTimeoutDef, setScaleMovTimeoutCallFunc);
|
||||
}
|
||||
epicsExportRegistrar(sinqControllerRegister);
|
||||
|
||||
|
@ -18,6 +18,7 @@ class epicsShareClass sinqController : public asynMotorController {
|
||||
public:
|
||||
sinqController(const char *portName, const char *SINQPortName, int numAxes,
|
||||
const int &extraParams = 2);
|
||||
~sinqController(void);
|
||||
|
||||
friend class sinqAxis;
|
||||
|
||||
|
Reference in New Issue
Block a user