Some ACS bugfixes #459
@ -42,14 +42,14 @@ void ActuatorCmd::cmdSpeedToRws(int32_t speedRw0, int32_t speedRw1, int32_t spee
|
|||||||
deltaSpeedInt[i] = std::round(deltaSpeed[i]);
|
deltaSpeedInt[i] = std::round(deltaSpeed[i]);
|
||||||
}
|
}
|
||||||
VectorOperations<int32_t>::add(speedRws, deltaSpeedInt, rwCmdSpeed, 4);
|
VectorOperations<int32_t>::add(speedRws, deltaSpeedInt, rwCmdSpeed, 4);
|
||||||
|
VectorOperations<int32_t>::mulScalar(rwCmdSpeed, 10, rwCmdSpeed, 4);
|
||||||
for (uint8_t i = 0; i < 4; i++) {
|
for (uint8_t i = 0; i < 4; i++) {
|
||||||
if (rwCmdSpeed[i] > maxRwSpeed) {
|
if (rwCmdSpeed[i] > maxRwSpeed) {
|
||||||
rwCmdSpeed[i] = maxRwSpeed;
|
rwCmdSpeed[i] = maxRwSpeed;
|
||||||
} else if (rwCmdSpeed[i] < -maxRwSpeed) {
|
} else if (rwCmdSpeed[i] < -maxRwSpeed) {
|
||||||
rwCmdSpeed[i] = -maxRwSpeed;
|
rwCmdSpeed[i] = -maxRwSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VectorOperations<int32_t>::mulScalar(rwCmdSpeed, 10, rwCmdSpeed, 4);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ActuatorCmd::cmdDipolMtq(const double *dipolMoment, int16_t *dipolMomentActuator,
|
void ActuatorCmd::cmdDipolMtq(const double *dipolMoment, int16_t *dipolMomentActuator,
|
||||||
|
Loading…
Reference in New Issue
Block a user