mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Merge pull request #10057 from etracer65/gps_rescue_fixed_wing_disable
Disable GPS RESCUE if mixer is fixed-wing type
This commit is contained in:
commit
a752d3d218
4 changed files with 10 additions and 5 deletions
|
@ -372,7 +372,7 @@ static void validateAndFixConfig(void)
|
|||
#endif
|
||||
|
||||
if (
|
||||
featureIsConfigured(FEATURE_3D) || !featureIsConfigured(FEATURE_GPS)
|
||||
featureIsConfigured(FEATURE_3D) || !featureIsConfigured(FEATURE_GPS) || mixerModeIsFixedWing(mixerConfig()->mixerMode)
|
||||
#if !defined(USE_GPS) || !defined(USE_GPS_RESCUE)
|
||||
|| true
|
||||
#endif
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -115,4 +115,5 @@ bool mixerIsTricopter(void);
|
|||
void mixerSetThrottleAngleCorrection(int correctionValue);
|
||||
float mixerGetThrottle(void);
|
||||
mixerMode_e getMixerMode(void);
|
||||
bool mixerModeIsFixedWing(mixerMode_e mixerMode);
|
||||
bool isFixedWing(void);
|
||||
|
|
|
@ -214,7 +214,7 @@ void initActiveBoxIds(void)
|
|||
#ifdef USE_GPS
|
||||
if (featureIsEnabled(FEATURE_GPS)) {
|
||||
#ifdef USE_GPS_RESCUE
|
||||
if (!featureIsEnabled(FEATURE_3D)) {
|
||||
if (!featureIsEnabled(FEATURE_3D) && !isFixedWing()) {
|
||||
BME(BOXGPSRESCUE);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue