mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AP_Baro: Move health to cpp and add range check
Moved the health checks to the cpp file and added range checking
This commit is contained in:
parent
11dd9e8095
commit
30d575df12
@ -58,9 +58,9 @@ public:
|
||||
bool healthy(void) const { return healthy(_primary); }
|
||||
#ifdef HAL_BUILD_AP_PERIPH
|
||||
// calibration and alt check not valid for AP_Periph
|
||||
bool healthy(uint8_t instance) const { return sensors[instance].healthy; }
|
||||
bool healthy(uint8_t instance) const;
|
||||
#else
|
||||
bool healthy(uint8_t instance) const { return sensors[instance].healthy && sensors[instance].alt_ok && sensors[instance].calibrated; }
|
||||
bool healthy(uint8_t instance) const;
|
||||
#endif
|
||||
|
||||
// check if all baros are healthy - used for SYS_STATUS report
|
||||
|
Loading…
Reference in New Issue
Block a user