Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ee483f8e9 | |||
| 002b5d2616 | |||
| ce80426790 | |||
| 72f3965881 |
2
Makefile
2
Makefile
@@ -34,4 +34,4 @@ TEMPLATES += db/turboPmac.db
|
|||||||
DBDS += sinqMotor/src/sinqMotor.dbd
|
DBDS += sinqMotor/src/sinqMotor.dbd
|
||||||
DBDS += src/turboPmac.dbd
|
DBDS += src/turboPmac.dbd
|
||||||
|
|
||||||
USR_CFLAGS += -Wall -Wextra -Weffc++ -Wunused-result -Werror -fvisibility=hidden # -Wpedantic // Does not work because EPICS macros trigger warnings
|
USR_CFLAGS += -Wall -Wextra -Wunused-result -Werror -fvisibility=hidden # -Wpedantic // Does not work because EPICS macros trigger warnings
|
||||||
Submodule sinqMotor updated: 8689c79f19...7a0de4e9d9
@@ -553,11 +553,6 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
int sizeUserMessage) {
|
int sizeUserMessage) {
|
||||||
asynStatus status = asynError;
|
asynStatus status = asynError;
|
||||||
|
|
||||||
// Create the unique callsite identifier manually so it can be used later in
|
|
||||||
// the shouldBePrinted calls.
|
|
||||||
msgPrintControlKey keyError = msgPrintControlKey(
|
|
||||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
|
||||||
|
|
||||||
switch (error) {
|
switch (error) {
|
||||||
case 0:
|
case 0:
|
||||||
status = asynSuccess;
|
status = asynSuccess;
|
||||||
@@ -566,8 +561,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
case 1:
|
case 1:
|
||||||
// EPICS should already prevent this issue in the first place,
|
// EPICS should already prevent this issue in the first place,
|
||||||
// since it contains the user limits
|
// since it contains the user limits
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nTarget "
|
"Controller \"%s\", axis %d => %s, line %d\nTarget "
|
||||||
"position would exceed user limits.%s\n",
|
"position would exceed user limits.%s\n",
|
||||||
@@ -579,8 +575,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
// Command not possible
|
// Command not possible
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(
|
asynPrint(
|
||||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nAxis is "
|
"Controller \"%s\", axis %d => %s, line %d\nAxis is "
|
||||||
@@ -594,8 +591,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
"moving. Please call the support.");
|
"moving. Please call the support.");
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nAir cushion "
|
"Controller \"%s\", axis %d => %s, line %d\nAir cushion "
|
||||||
"feedback stopped during movement (P%2.2d01 = %d).%s\n",
|
"feedback stopped during movement (P%2.2d01 = %d).%s\n",
|
||||||
@@ -609,8 +607,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
setAxisParamChecked(this, motorMessageText, userMessage);
|
setAxisParamChecked(this, motorMessageText, userMessage);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(
|
asynPrint(
|
||||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nNo air cushion "
|
"Controller \"%s\", axis %d => %s, line %d\nNo air cushion "
|
||||||
@@ -633,8 +632,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
which is not properly homed or if a bug occured.
|
which is not properly homed or if a bug occured.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(
|
asynPrint(
|
||||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nAxis hit the "
|
"Controller \"%s\", axis %d => %s, line %d\nAxis hit the "
|
||||||
@@ -653,8 +653,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
case 11:
|
case 11:
|
||||||
// Following error
|
// Following error
|
||||||
|
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(
|
asynPrint(
|
||||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nMaximum allowed "
|
"Controller \"%s\", axis %d => %s, line %d\nMaximum allowed "
|
||||||
@@ -671,8 +672,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 12:
|
case 12:
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nSecurity "
|
"Controller \"%s\", axis %d => %s, line %d\nSecurity "
|
||||||
"input is triggered (P%2.2d01 = %d).%s\n",
|
"input is triggered (P%2.2d01 = %d).%s\n",
|
||||||
@@ -690,8 +692,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
case 13:
|
case 13:
|
||||||
// Driver hardware error triggered
|
// Driver hardware error triggered
|
||||||
|
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nDriver "
|
"Controller \"%s\", axis %d => %s, line %d\nDriver "
|
||||||
"hardware error triggered.%s\n",
|
"hardware error triggered.%s\n",
|
||||||
@@ -707,8 +710,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
case 14:
|
case 14:
|
||||||
// EPICS should already prevent this issue in the first place,
|
// EPICS should already prevent this issue in the first place,
|
||||||
// since it contains the user limits
|
// since it contains the user limits
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nMove "
|
"Controller \"%s\", axis %d => %s, line %d\nMove "
|
||||||
"command exceeds hardware limits (P%2.2d01 = %d).%s\n",
|
"command exceeds hardware limits (P%2.2d01 = %d).%s\n",
|
||||||
@@ -723,8 +727,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||||
pC_->pasynUser())) {
|
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true,
|
||||||
|
pC_->pasynUser())) {
|
||||||
asynPrint(
|
asynPrint(
|
||||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||||
"Controller \"%s\", axis %d => %s, line %d\nUnknown error "
|
"Controller \"%s\", axis %d => %s, line %d\nUnknown error "
|
||||||
@@ -735,10 +740,6 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
|||||||
setAxisParamChecked(this, motorMessageText, userMessage);
|
setAxisParamChecked(this, motorMessageText, userMessage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == asynSuccess) {
|
|
||||||
pC_->getMsgPrintControl().resetCount(keyError, pC_->pasynUser());
|
|
||||||
}
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ struct turboPmacControllerImpl {
|
|||||||
// User for writing int32 values to the port driver.
|
// User for writing int32 values to the port driver.
|
||||||
asynUser *pasynInt32SyncIOipPort;
|
asynUser *pasynInt32SyncIOipPort;
|
||||||
|
|
||||||
// Indices of additional PVs
|
// Indices of additional ParamLib entries
|
||||||
int rereadEncoderPosition;
|
int rereadEncoderPosition;
|
||||||
int readConfig;
|
int readConfig;
|
||||||
int flushHardware;
|
int flushHardware;
|
||||||
|
|||||||
Reference in New Issue
Block a user