From f0fdedfd5addc1f09ad6894efcc8c64234671bc0 Mon Sep 17 00:00:00 2001 From: smathis Date: Fri, 6 Mar 2026 14:26:13 +0100 Subject: [PATCH] Updated error message --- sinqMotor | 2 +- src/turboPmacAxis.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sinqMotor b/sinqMotor index a84992b..92c264d 160000 --- a/sinqMotor +++ b/sinqMotor @@ -1 +1 @@ -Subproject commit a84992b4cd00edace674c2b4aae0ba567447a4f7 +Subproject commit 92c264d0f688a5cd903d3f66f0e3aaa85410df22 diff --git a/src/turboPmacAxis.cpp b/src/turboPmacAxis.cpp index 8005fd8..6daa0ab 100644 --- a/src/turboPmacAxis.cpp +++ b/src/turboPmacAxis.cpp @@ -214,6 +214,11 @@ asynStatus turboPmacAxis::init() { &motorVmax, &motorVelocity, &motorAccel, &acoDelay, &counts_to_eu, &deadband_counts, &hasBeenHomed); + if (nvals != 8) { + return pC_->couldNotParseResponse(command, response, axisNo_, + __PRETTY_FUNCTION__, __LINE__); + } + // The acoDelay is given in milliseconds -> Convert to seconds, rounded // up setOffsetMovTimeout(std::ceil(acoDelay / 1000.0)); @@ -223,11 +228,6 @@ asynStatus turboPmacAxis::init() { // here to mm/s^2. motorAccel = motorAccel * 1000; - if (nvals != 7) { - return pC_->couldNotParseResponse(command, response, axisNo_, - __PRETTY_FUNCTION__, __LINE__); - } - // Store these values in the parameter library status = setMotorPosition(motorPos); if (status != asynSuccess) {