Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c64b4cee8 | |||
| df09b1949e |
3
Makefile
3
Makefile
@@ -42,4 +42,5 @@ DBDS += turboPmac/sinqMotor/src/sinqMotor.dbd
|
||||
DBDS += turboPmac/src/turboPmac.dbd
|
||||
DBDS += src/detectorTower.dbd
|
||||
|
||||
USR_CFLAGS += -Wall -Wextra -Wunused-result -Wextra -Werror -fvisibility=hidden # -Wpedantic // Does not work because EPICS macros trigger warnings
|
||||
USR_CFLAGS += -Wall -Wextra -Wunused-result -Wextra -Werror # -Wpedantic // Does not work because EPICS macros trigger warnings
|
||||
USR_CXXFLAGS += -Wall -Wextra -Wunused-result -Werror
|
||||
@@ -179,6 +179,10 @@ asynStatus detectorTowerAngleAxis::poll(bool *moving) {
|
||||
}
|
||||
|
||||
asynStatus detectorTowerAngleAxis::doPoll(bool *moving) {
|
||||
|
||||
// Suppress unused variable warning
|
||||
(void)moving;
|
||||
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nThe doPoll method "
|
||||
"of this axis type should not be reachable. This is a bug.\n",
|
||||
@@ -187,9 +191,16 @@ asynStatus detectorTowerAngleAxis::doPoll(bool *moving) {
|
||||
}
|
||||
|
||||
asynStatus detectorTowerAngleAxis::doMove(double position, int relative,
|
||||
double min_velocity,
|
||||
double max_velocity,
|
||||
double minVelocity,
|
||||
double maxVelocity,
|
||||
double acceleration) {
|
||||
|
||||
// Suppress unused variable warning
|
||||
(void)relative;
|
||||
(void)minVelocity;
|
||||
(void)maxVelocity;
|
||||
(void)acceleration;
|
||||
|
||||
double motorRecResolution = 0.0;
|
||||
getAxisParamChecked(this, motorRecResolution, &motorRecResolution);
|
||||
|
||||
@@ -276,6 +287,9 @@ asynStatus detectorTowerAngleAxis::stop(double acceleration) {
|
||||
|
||||
// =========================================================================
|
||||
|
||||
// Suppress unused variable warning
|
||||
(void)acceleration;
|
||||
|
||||
status = pC_->writeRead(axisNo_, "P350=8", response, 0);
|
||||
|
||||
if (status != asynSuccess) {
|
||||
@@ -540,8 +554,9 @@ static const iocshArg *const CreateAxisArgs[] = {
|
||||
&CreateAxisArg2,
|
||||
&CreateAxisArg3,
|
||||
};
|
||||
static const iocshFuncDef configDetectorTowerCreateAxis = {"detectorTowerAxis",
|
||||
4, CreateAxisArgs};
|
||||
static const iocshFuncDef configDetectorTowerCreateAxis = {
|
||||
"detectorTowerAxis", 4, CreateAxisArgs,
|
||||
"Create new instances of detectorTower axes."};
|
||||
static void configDetectorTowerCreateAxisCallFunc(const iocshArgBuf *args) {
|
||||
detectorTowerCreateAxis(args[0].sval, args[1].ival, args[2].ival,
|
||||
args[3].ival);
|
||||
@@ -595,7 +610,8 @@ static const iocshArg *const setDeferredMovementWaitArgs[] = {
|
||||
&setDeferredMovementWaitArg0, &setDeferredMovementWaitArg1,
|
||||
&setDeferredMovementWaitArg2};
|
||||
static const iocshFuncDef setDeferredMovementWaitDef = {
|
||||
"setDeferredMovementWait", 3, setDeferredMovementWaitArgs};
|
||||
"setDeferredMovementWait", 3, setDeferredMovementWaitArgs,
|
||||
"Set the wait time in seconds for the deferred movement."};
|
||||
|
||||
static void setDeferredMovementWaitCallFunc(const iocshArgBuf *args) {
|
||||
setDeferredMovementWait(args[0].sval, args[1].ival, args[2].dval);
|
||||
|
||||
@@ -56,13 +56,13 @@ class HIDDEN detectorTowerAngleAxis : public turboPmacAxis {
|
||||
*
|
||||
* @param position
|
||||
* @param relative
|
||||
* @param min_velocity
|
||||
* @param max_velocity
|
||||
* @param minVelocity
|
||||
* @param maxVelocity
|
||||
* @param acceleration
|
||||
* @return asynStatus
|
||||
*/
|
||||
asynStatus doMove(double position, int relative, double min_velocity,
|
||||
double max_velocity, double acceleration);
|
||||
asynStatus doMove(double position, int relative, double minVelocity,
|
||||
double maxVelocity, double acceleration);
|
||||
|
||||
/**
|
||||
* @brief Start a movement to the target positions of this axis and the
|
||||
|
||||
@@ -26,7 +26,8 @@ detectorTowerController::detectorTowerController(
|
||||
const char *portName, const char *ipPortConfigName, int numAxes,
|
||||
double movingPollPeriod, double idlePollPeriod, double comTimeout)
|
||||
: turboPmacController(portName, ipPortConfigName, numAxes, movingPollPeriod,
|
||||
idlePollPeriod, NUM_detectorTower_DRIVER_PARAMS)
|
||||
idlePollPeriod, comTimeout,
|
||||
NUM_detectorTower_DRIVER_PARAMS)
|
||||
|
||||
{
|
||||
|
||||
@@ -1005,7 +1006,8 @@ static const iocshArg *const CreateControllerArgs[] = {
|
||||
&CreateControllerArg0, &CreateControllerArg1, &CreateControllerArg2,
|
||||
&CreateControllerArg3, &CreateControllerArg4, &CreateControllerArg5};
|
||||
static const iocshFuncDef configDetectorTowerCreateController = {
|
||||
"detectorTowerController", 6, CreateControllerArgs};
|
||||
"detectorTowerController", 6, CreateControllerArgs,
|
||||
"Create a new instance of a detector tower controller."};
|
||||
static void
|
||||
configDetectorTowerCreateControllerCallFunc(const iocshArgBuf *args) {
|
||||
detectorTowerCreateController(args[0].sval, args[1].sval, args[2].ival,
|
||||
|
||||
@@ -72,7 +72,7 @@ detectorTowerLiftAxis::detectorTowerLiftAxis(detectorTowerController *pC,
|
||||
angleAxis->liftAxis_ = this;
|
||||
|
||||
// Initialize the flag to false
|
||||
waitingForStart_ = false;
|
||||
waitingForStart_ = false;
|
||||
}
|
||||
|
||||
detectorTowerLiftAxis::~detectorTowerLiftAxis(void) {
|
||||
@@ -149,6 +149,10 @@ asynStatus detectorTowerLiftAxis::poll(bool *moving) {
|
||||
}
|
||||
|
||||
asynStatus detectorTowerLiftAxis::doPoll(bool *moving) {
|
||||
|
||||
// Suppress unused variable warnings
|
||||
(void)moving;
|
||||
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nThe doPoll method "
|
||||
"of this axis type should not be reachable. This is a bug.\n",
|
||||
@@ -157,9 +161,14 @@ asynStatus detectorTowerLiftAxis::doPoll(bool *moving) {
|
||||
}
|
||||
|
||||
asynStatus detectorTowerLiftAxis::doMove(double position, int relative,
|
||||
double min_velocity,
|
||||
double max_velocity,
|
||||
double minVelocity, double maxVelocity,
|
||||
double acceleration) {
|
||||
// Suppress unused variable warnings
|
||||
(void)relative;
|
||||
(void)minVelocity;
|
||||
(void)maxVelocity;
|
||||
(void)acceleration;
|
||||
|
||||
double motorRecResolution = 0.0;
|
||||
getAxisParamChecked(this, motorRecResolution, &motorRecResolution);
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ class HIDDEN detectorTowerLiftAxis : public turboPmacAxis {
|
||||
*
|
||||
* @param position
|
||||
* @param relative
|
||||
* @param min_velocity
|
||||
* @param max_velocity
|
||||
* @param minVelocity
|
||||
* @param maxVelocity
|
||||
* @param acceleration
|
||||
* @return asynStatus
|
||||
*/
|
||||
asynStatus doMove(double position, int relative, double min_velocity,
|
||||
double max_velocity, double acceleration);
|
||||
asynStatus doMove(double position, int relative, double minVelocity,
|
||||
double maxVelocity, double acceleration);
|
||||
|
||||
/**
|
||||
* @brief Calls the `reset` function of the associated angle axis.
|
||||
|
||||
@@ -146,6 +146,10 @@ asynStatus detectorTowerSupportAxis::poll(bool *moving) {
|
||||
}
|
||||
|
||||
asynStatus detectorTowerSupportAxis::doPoll(bool *moving) {
|
||||
|
||||
// Suppress unused variable warnings
|
||||
(void)moving;
|
||||
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nThe doPoll method "
|
||||
"of this axis type should not be reachable. This is a bug.\n",
|
||||
|
||||
@@ -56,13 +56,21 @@ class HIDDEN detectorTowerSupportAxis : public turboPmacAxis {
|
||||
*
|
||||
* @param position
|
||||
* @param relative
|
||||
* @param min_velocity
|
||||
* @param max_velocity
|
||||
* @param minVelocity
|
||||
* @param maxVelocity
|
||||
* @param acceleration
|
||||
* @return asynStatus
|
||||
*/
|
||||
asynStatus doMove(double position, int relative, double min_velocity,
|
||||
double max_velocity, double acceleration) {
|
||||
asynStatus doMove(double position, int relative, double minVelocity,
|
||||
double maxVelocity, double acceleration) {
|
||||
|
||||
// Suppress unused variable warnings
|
||||
(void)position;
|
||||
(void)relative;
|
||||
(void)minVelocity;
|
||||
(void)maxVelocity;
|
||||
(void)acceleration;
|
||||
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
|
||||
Submodule turboPmac updated: 9d61852713...62ccf046fd
Reference in New Issue
Block a user