Updated sinqMotor to new 1.6.0
Some checks failed
Test And Build / Lint (push) Failing after 4s
Test And Build / Build (push) Successful in 7s

This commit is contained in:
2026-02-11 11:05:48 +01:00
parent 41c1dad208
commit 488d9c1279

View File

@@ -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;