1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-17 05:15:23 +03:00

use pitot values only if healty

This commit is contained in:
Roman Lut 2023-02-27 18:03:17 +01:00
parent 9c32094f5e
commit 936a7fd3a2
7 changed files with 12 additions and 7 deletions

View file

@ -679,7 +679,9 @@ bool isFixedWingFlying(void)
{
float airspeed = 0.0f;
#ifdef USE_PITOT
airspeed = getAirspeedEstimate();
if (sensors(SENSOR_PITOT) && pitotIsHealthy()) {
airspeed = getAirspeedEstimate();
}
#endif
bool throttleCondition = getMotorCount() == 0 || rcCommand[THROTTLE] > currentBatteryProfile->nav.fw.cruise_throttle;
bool velCondition = posControl.actualState.velXY > 250.0f || airspeed > 250.0f;