From 6e4724cde40578dfdada670059f56d7a8d17b163 Mon Sep 17 00:00:00 2001 From: smathis Date: Fri, 9 Jan 2026 13:46:14 +0100 Subject: [PATCH] Fixed error messages --- README.md | 2 +- src/turboPmacAxis.cpp | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 8628dd7..239ab34 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ turboPmac exports the following IOC shell functions: The full turboPmacX.cmd file looks like this: -``` +```bash # Define the name of the controller and the corresponding port epicsEnvSet("DRIVER_PORT","turboPmacX") epicsEnvSet("IP_PORT","p$(DRIVER_PORT)") diff --git a/src/turboPmacAxis.cpp b/src/turboPmacAxis.cpp index fd7c302..4a4affe 100644 --- a/src/turboPmacAxis.cpp +++ b/src/turboPmacAxis.cpp @@ -620,16 +620,18 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage, if (pC_->getMsgPrintControl().shouldBePrinted( pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, true, pC_->pasynUser())) { - asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR, - "Controller \"%s\", axis %d => %s, line %d\nLost feedback " - "from auxiliary device during movement (P%2.2d01 = %d).%s\n", - pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, - axisNo_, error, pC_->getMsgPrintControl().getSuffix()); + asynPrint( + pC_->pasynUser(), ASYN_TRACE_ERROR, + "Controller \"%s\", axis %d => %s, line %d\nLost feedback " + "from auxiliary device during movement (P%2.2d01 = %d).%s\n", + pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, axisNo_, + error, pC_->getMsgPrintControl().getSuffix()); } - snprintf(userMessage, sizeUserMessage, - "Lost feedback from auxiliary device during movement (P%2.2d01 = " - "%d). Please call the support.", - axisNo_, error); + snprintf( + userMessage, sizeUserMessage, + "Lost feedback from auxiliary device during movement (P%2.2d01 = " + "%d). Please call the support.", + axisNo_, error); setAxisParamChecked(this, motorMessageText, userMessage); break; case 9: @@ -644,10 +646,11 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage, error, pC_->getMsgPrintControl().getSuffix()); } - snprintf(userMessage, sizeUserMessage, - "No feedback from auxiliary device before movement (P%2.2d01 = " - "%d). Please call the support.", - axisNo_, error); + snprintf( + userMessage, sizeUserMessage, + "No feedback from auxiliary device before movement (P%2.2d01 = " + "%d). Please call the support.", + axisNo_, error); setAxisParamChecked(this, motorMessageText, userMessage); break; case 10: