From f37015a97f40a7339e7733b57ae1a735e1342df1 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 13 Dec 2023 08:05:44 +0300 Subject: [PATCH] Temporary remove controlManual to paste it bellow --- flix/control.ino | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/flix/control.ino b/flix/control.ino index 969281e..3e6fce2 100644 --- a/flix/control.ino +++ b/flix/control.ino @@ -127,27 +127,6 @@ void controlAttitude() } } -// passthrough mode -void controlManual() -{ - if (controls[RC_CHANNEL_THROTTLE] < 0.1) { - memset(motors, 0, sizeof(motors)); - return; - } - - torqueTarget = ratesTarget * 0.01; - - 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[0] = constrain(motors[0], 0, 1); - motors[1] = constrain(motors[1], 0, 1); - motors[2] = constrain(motors[2], 0, 1); - motors[3] = constrain(motors[3], 0, 1); -} - void controlRate() { if (!armed) {