From 7cfcf5b63bfb99b37c5c2d3bc3e20578c1fa8dc0 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Tue, 21 May 2024 10:52:39 +0300 Subject: [PATCH] Use more natural torqueTarget order in mixer (xyz) --- flix/control.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flix/control.ino b/flix/control.ino index 2d18175..ae60e4a 100644 --- a/flix/control.ino +++ b/flix/control.ino @@ -149,10 +149,10 @@ void controlTorque() { return; } - motors[MOTOR_FRONT_LEFT] = thrustTarget + torqueTarget.y + torqueTarget.x - torqueTarget.z; - motors[MOTOR_FRONT_RIGHT] = thrustTarget + torqueTarget.y - torqueTarget.x + torqueTarget.z; - motors[MOTOR_REAR_LEFT] = thrustTarget - torqueTarget.y + torqueTarget.x + torqueTarget.z; - motors[MOTOR_REAR_RIGHT] = thrustTarget - torqueTarget.y - torqueTarget.x - torqueTarget.z; + motors[MOTOR_FRONT_LEFT] = thrustTarget + torqueTarget.x + torqueTarget.y - torqueTarget.z; + motors[MOTOR_FRONT_RIGHT] = thrustTarget - torqueTarget.x + torqueTarget.y + torqueTarget.z; + motors[MOTOR_REAR_LEFT] = thrustTarget + torqueTarget.x - torqueTarget.y + torqueTarget.z; + motors[MOTOR_REAR_RIGHT] = thrustTarget - torqueTarget.x - torqueTarget.y - torqueTarget.z; motors[0] = constrain(motors[0], 0, 1); motors[1] = constrain(motors[1], 0, 1);