1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-19 06:15:14 +03:00

Rename pitotCalculateAirSpeed

This commit is contained in:
JuliooCesarMDM 2022-08-16 21:11:53 -03:00
parent 1b003cc861
commit 9b5106aafe
17 changed files with 32 additions and 30 deletions

View file

@ -596,12 +596,12 @@ bool isFixedWingAutoThrottleManuallyIncreased()
bool isFixedWingFlying(void)
{
float airspeed = 0;
float airspeed = 0.0f;
#ifdef USE_PITOT
airspeed = pitot.airSpeed;
airspeed = getAirspeedEstimate();
#endif
bool throttleCondition = getMotorCount() == 0 || rcCommand[THROTTLE] > currentBatteryProfile->nav.fw.cruise_throttle;
bool velCondition = posControl.actualState.velXY > 250 || airspeed > 250;
bool velCondition = posControl.actualState.velXY > 250.0f || airspeed > 250.0f;
bool launchCondition = isNavLaunchEnabled() && fixedWingLaunchStatus() == FW_LAUNCH_FLYING;
return (isImuHeadingValid() && throttleCondition && velCondition) || launchCondition;