Updated to sinqMotor 1.6.1

This commit is contained in:
2026-01-20 16:50:03 +01:00
parent fd41d4c9c0
commit 18e68b193a
5 changed files with 54 additions and 52 deletions
-38
View File
@@ -574,44 +574,6 @@ asynStatus masterMacsController::readInt32(asynUser *pasynUser,
}
}
asynStatus masterMacsController::writeInt32(asynUser *pasynUser,
epicsInt32 value) {
// masterMacs can be disabled
if (pasynUser->reason == motorSetMode()) {
// First call to the sinqController function. It checks whether it is
// possible to set the mode and whether the given value is valid.
asynStatus status = sinqController::writeInt32(pasynUser, value);
if (status == asynSuccess) {
// Now write to the hardware
char command[MAXBUF_];
int axisNo;
getAddress(pasynUser, &axisNo);
// Map the EPICS value to MasterMACS values (see
// MasterMACS_manual.pdf).
int adjustedValue = 0;
if (value == 0) {
adjustedValue = 1;
} else if (value == 1) {
adjustedValue = 3;
} else {
// This branch is unreachable, as it is is already checked
// within sinqController::writeInt32 that value is either 0
// or 1.
return asynError;
}
snprintf(command, sizeof(value), "%d", adjustedValue);
return write(axisNo, 07, command);
}
return status;
} else {
return sinqController::writeInt32(pasynUser, value);
}
}
double masterMacsController::comTimeout() { return pMasterMacsC_->comTimeout; }
int masterMacsController::nodeReset() { return pMasterMacsC_->nodeReset; }