mirror of
https://github.com/okalachev/flix.git
synced 2025-07-29 12:28:59 +00:00
Temporary remove controlManual to paste it bellow
This commit is contained in:
parent
cb27e0f61f
commit
f37015a97f
@ -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()
|
void controlRate()
|
||||||
{
|
{
|
||||||
if (!armed) {
|
if (!armed) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user