From 43507bb5efe643fe9d84995ad10a1f880601214f Mon Sep 17 00:00:00 2001 From: Kevin Peterson Date: Fri, 6 Sep 2024 10:13:15 -0500 Subject: [PATCH] Modified stepper motor detection logic based on empirical data --- acsMotionApp/src/SPiiPlusDriver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acsMotionApp/src/SPiiPlusDriver.cpp b/acsMotionApp/src/SPiiPlusDriver.cpp index 0d64d82..fdc7d4c 100644 --- a/acsMotionApp/src/SPiiPlusDriver.cpp +++ b/acsMotionApp/src/SPiiPlusDriver.cpp @@ -152,7 +152,8 @@ SPiiPlusController::SPiiPlusController(const char* ACSPortName, const char* asyn // axis resolution (used to convert motor record steps into controller EGU) // TODO: how should nanomotion piezo ceramic motors (bit 7 of mflags) be handled? - if ((pAxes_[index]->brushl_ == 0) && (pAxes_[index]->linear_ == 0)) + // TODO: does the following logic fail to identify non-PD steppers that aren't microstepping as stepper motors? + if ((pAxes_[index]->micro_ > 0) || ((pAxes_[index]->stepper_ > 0) && (pAxes_[index]->stepenc_ == 0))) { // Use the stepper factor as the resolution for stepper motors pAxes_[index]->resolution_ = stepperFactor_[index];