mirror of
https://github.com/okalachev/flix.git
synced 2026-08-15 16:29:00 +00:00
Add threshold for rc sticks move for quitting auto mode
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ void descend() {
|
||||
// Allow pilot to interrupt automatic flight
|
||||
void autoFailsafe() {
|
||||
static float roll, pitch, yaw, throttle;
|
||||
if (roll != controlRoll || pitch != controlPitch || yaw != controlYaw || abs(throttle - controlThrottle) > 0.05) {
|
||||
if (abs(roll - controlRoll) > 0.05 || abs(pitch - controlPitch) > 0.05 || abs(yaw - controlYaw) > 0.05 || abs(throttle - controlThrottle) > 0.05) {
|
||||
// controls changed and mode switch is not configured
|
||||
if (mode == AUTO && invalid(controlMode)) mode = STAB; // regain control by the pilot
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user