From 488d9c1279ae308c52770144b2f24fbc99314c41 Mon Sep 17 00:00:00 2001 From: smathis Date: Wed, 11 Feb 2026 11:05:48 +0100 Subject: [PATCH] Updated sinqMotor to new 1.6.0 --- src/masterMacsAxis.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/masterMacsAxis.cpp b/src/masterMacsAxis.cpp index cc14997..67ceedd 100644 --- a/src/masterMacsAxis.cpp +++ b/src/masterMacsAxis.cpp @@ -190,9 +190,7 @@ asynStatus masterMacsAxis::init() { double motVelocity = 0.0; double motVmax = 0.0; double motAccel = 0.0; - int motMode = 0; int dynamicLimits = 0; - int motCanSetMode = 0; // ========================================================================= @@ -306,37 +304,6 @@ asynStatus masterMacsAxis::init() { } pMasterMacsA_->dynamicLimits = bool(dynamicLimits); - // Check the current motor mode - status = pC_->read(axisNo_, 07, response); - if (status != asynSuccess) { - return status; - } - nvals = sscanf(response, "%d", &motMode); - if (nvals != 1) { - return pC_->couldNotParseResponse("R07", response, axisNo_, - __PRETTY_FUNCTION__, __LINE__); - } - - // If the readback value from the controller is 3, it is in velocity mode, - // which sinqMotor encodes as a 1. Otherwise, it is in position mode. - setAxisParamChecked(this, motorMode, motMode == 3); - - // Check if the motor can switch its mode - status = pC_->read(axisNo_, 31, response); - if (status != asynSuccess) { - return status; - } - nvals = sscanf(response, "%d", &motCanSetMode); - if (nvals != 1) { - return pC_->couldNotParseResponse("R31", response, axisNo_, - __PRETTY_FUNCTION__, __LINE__); - } - - // If the readback value from the controller is 3, the motor supports both - // velocity and position mode, otherwise just one of them (the one read out - // with motMode). - setAxisParamChecked(this, motorCanSetMode, motCanSetMode == 3); - status = readEncoderType(); if (status != asynSuccess) { return status;