Browse Source

AirspeedValidator: remove unnecessary _checks_failing

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
release/1.12
Silvan Fuhrer 4 years ago
parent
commit
083cd6f1c1
  1. 2
      src/lib/airspeed_validator/AirspeedValidator.cpp
  2. 1
      src/lib/airspeed_validator/AirspeedValidator.hpp

2
src/lib/airspeed_validator/AirspeedValidator.cpp

@ -221,12 +221,10 @@ AirspeedValidator::update_airspeed_valid_status(const uint64_t timestamp) @@ -221,12 +221,10 @@ AirspeedValidator::update_airspeed_valid_status(const uint64_t timestamp)
if (_innovations_check_failed || _load_factor_check_failed || data_missing) {
// either innovation, load factor or data missing check failed, so declare airspeed failing and record timestamp
_time_checks_failed = timestamp;
_airspeed_failing = true;
} else if (!_innovations_check_failed && !_load_factor_check_failed && !data_missing) {
// All checks must pass to declare airspeed good
_time_checks_passed = timestamp;
_airspeed_failing = false;
}
if (_airspeed_valid) {

1
src/lib/airspeed_validator/AirspeedValidator.hpp

@ -152,7 +152,6 @@ private: @@ -152,7 +152,6 @@ private:
bool _airspeed_valid{false}; ///< airspeed valid (pitot or groundspeed-windspeed)
int _checks_fail_delay{3}; ///< delay for airspeed invalid declaration after single check failure (Sec)
int _checks_clear_delay{3}; ///< delay for airspeed valid declaration after all checks passed again (Sec)
bool _airspeed_failing{false}; ///< airspeed sensor checks have detected failure, but not yet declared failed
uint64_t _time_checks_passed{0}; ///< time the checks have last passed (uSec)
uint64_t _time_checks_failed{0}; ///< time the checks have last not passed (uSec)

Loading…
Cancel
Save