mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Merge pull request #8330 from JulioCesarMatias/RenameASFunction
Rename pitotCalculateAirSpeed()
This commit is contained in:
commit
cdaf835822
17 changed files with 32 additions and 30 deletions
|
@ -660,12 +660,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue