mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 19:43:33 +08:00
failsafe: prevent immediate low battery failsafe for existing low battery state
This happens when BAT_CRIT_THR allows arming with a critical battery level. With this change it still fails the checks but only warns instead of doing the failsafe action because that would immediately land the vehicle before it has taken off.
This commit is contained in:
@@ -173,6 +173,7 @@ private:
|
||||
hrt_abstime _armed_time{0};
|
||||
bool _was_armed{false};
|
||||
bool _manual_control_lost_at_arming{false}; ///< true if manual control was lost at arming time
|
||||
uint8_t _battery_warning_at_arming{0}; ///< low battery state at arming time
|
||||
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(FailsafeBase,
|
||||
(ParamInt<px4::params::NAV_DLL_ACT>) _param_nav_dll_act,
|
||||
|
||||
Reference in New Issue
Block a user