PositionDeadband, dynamic limit detection, velocity mode
Test And Build / Lint (push) Failing after 4s
Test And Build / Build (push) Failing after 6s

Integrated a readout function for the position deadband. Also read from
the controller if the axis has dynamic limits and only poll the limits
repeatedly if that is the case. Lastly, added support for the velocity
mode (untested!).
This commit is contained in:
2026-01-20 15:09:51 +01:00
parent f3f0a77f10
commit fd41d4c9c0
4 changed files with 301 additions and 98 deletions
+39 -1
View File
@@ -570,7 +570,45 @@ asynStatus masterMacsController::readInt32(asynUser *pasynUser,
*value = 1;
return asynSuccess;
} else {
return asynMotorController::readInt32(pasynUser, value);
return sinqController::readInt32(pasynUser, value);
}
}
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);
}
}