Make fromEulerZYX accept Vector instead of x, y, z

This commit is contained in:
Oleg Kalachev
2024-02-20 04:51:59 +03:00
parent 85182ac2b8
commit 5ec6b5e665
2 changed files with 11 additions and 12 deletions

View File

@@ -89,10 +89,10 @@ void interpretRC() {
} else if (mode == STAB) {
yawMode = controls[RC_CHANNEL_YAW] == 0 ? YAW : YAW_RATE;
attitudeTarget = Quaternion::fromEulerZYX(
attitudeTarget = Quaternion::fromEulerZYX(Vector(
controls[RC_CHANNEL_ROLL] * MAX_TILT,
-controls[RC_CHANNEL_PITCH] * MAX_TILT,
attitudeTarget.getYaw());
attitudeTarget.getYaw()));
ratesTarget.z = controls[RC_CHANNEL_YAW] * YAWRATE_MAX;
} else if (mode == MANUAL) {