mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 16:25:31 +03:00
Disable GPS RESCUE if mixer is fixed-wing type
GPS Rescue flight control logic only knows how to fly multirotors and engaging GPS Rescue on a fixed-wing craft would result in an immediate loss of control and crash. For example, when GPS Rescue is engaged it attempts to yaw to the home direction heading and this won't work on fixed wing (particularly the flying wing mixer with no rudder). Next it tries to attain the target altitude exclusively with throttle control - not how altitude is controlled with a fix-wing aircraft. Also the GPS Rescue no-fix arming prevention logic shouldn't be applied.
This commit is contained in:
parent
1d78f97846
commit
2317b5fe8d
4 changed files with 10 additions and 5 deletions
|
@ -992,10 +992,9 @@ mixerMode_e getMixerMode(void)
|
|||
return currentMixerMode;
|
||||
}
|
||||
|
||||
|
||||
bool isFixedWing(void)
|
||||
bool mixerModeIsFixedWing(mixerMode_e mixerMode)
|
||||
{
|
||||
switch (currentMixerMode) {
|
||||
switch (mixerMode) {
|
||||
case MIXER_FLYING_WING:
|
||||
case MIXER_AIRPLANE:
|
||||
case MIXER_CUSTOM_AIRPLANE:
|
||||
|
@ -1008,3 +1007,8 @@ bool isFixedWing(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool isFixedWing(void)
|
||||
{
|
||||
return mixerModeIsFixedWing(currentMixerMode);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue