Fixed some small bugs

This commit is contained in:
2025-10-13 16:57:30 +02:00
parent a70bcc0d75
commit 6d00209e8a
2 changed files with 20 additions and 23 deletions

View File

@@ -143,7 +143,6 @@ asynStatus turboPmacAxis::init() {
// Offset time for the movement watchdog caused by the air cushions in
// milliseconds.
int acoDelay = 0.0;
int axStatus = 0;
// The parameter library takes some time to be initialized. Therefore we
// wait until the status is not asynParamUndefined anymore.
@@ -177,8 +176,7 @@ asynStatus turboPmacAxis::init() {
Ixx65.
*/
snprintf(command, sizeof(command),
"P%2.2d00 Q%2.2d10 Q%2.2d03 Q%2.2d04 Q%2.2d06 P%2.2d22 Q%2.2d00 "
"I%2.2d65",
"Q%2.2d10 Q%2.2d03 Q%2.2d04 Q%2.2d06 P%2.2d22 Q%2.2d00 I%2.2d65",
axisNo_, axisNo_, axisNo_, axisNo_, axisNo_, axisNo_, axisNo_,
axisNo_);
status = pC_->writeRead(axisNo_, command, response, 8);
@@ -193,9 +191,9 @@ asynStatus turboPmacAxis::init() {
pC_->portName, axisNo(), __PRETTY_FUNCTION__, __LINE__);
pTurboPmacA_->needInit = true;
}
nvals = sscanf(response, "%d %lf %lf %lf %lf %d %lf %lf", &axStatus,
&motorPos, &motorVmax, &motorVelocity, &motorAccel,
&acoDelay, &counts_to_eu, &deadband_counts);
nvals = sscanf(response, "%lf %lf %lf %lf %d %lf %lf", &motorPos,
&motorVmax, &motorVelocity, &motorAccel, &acoDelay,
&counts_to_eu, &deadband_counts);
// The acoDelay is given in milliseconds -> Convert to seconds, rounded up
setOffsetMovTimeout(std::ceil(acoDelay / 1000.0));
@@ -555,11 +553,6 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
errorStatus = handleError(error, userMessage, sizeof(userMessage));
// Update the parameter library
if (error != 0) {
setAxisParamChecked(this, motorStatusProblem, true);
}
if (*moving == false) {
setAxisParamChecked(this, motorMoveToHome, false);
}