Geofence - Do not trigger geofence failsafe while in low battery

failsafe action.
Also move geofence flags from static variables declared into the if
statement to private members of the class.
This commit is contained in:
bresch
2019-06-04 08:35:56 +02:00
committed by Julian Oes
parent a707403eaf
commit 427b2e6636
2 changed files with 34 additions and 23 deletions
+6
View File
@@ -163,6 +163,12 @@ private:
float _load_factor_ratio{0.5f}; /**< ratio of maximum load factor predicted by stall speed to measured load factor */
float _apsd_innov_integ_state{0.0f}; /**< inegral of excess normalised airspeed innovation (sec) */
/* geofence flags */
bool _geofence_loiter_on{false};
bool _geofence_rtl_on{false};
bool _warning_action_on{false};
hrt_abstime _last_geofence_violation{0};
FailureDetector _failure_detector;
bool _failure_detector_termination_printed{false};