mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
Commander: Switch system off if in undervoltage condition and disarmed.
This is necessary to not have systems deep-discharge the battery while sitting idle. While at it we also deny arming in low battery conditions to ensure people who just landed with a low battery do not take off again and fail to get a successful RTL.
This commit is contained in:
committed by
Lorenz Meier
parent
6f84e79d70
commit
a92931fe84
@@ -1166,11 +1166,11 @@ int preflight_check(struct vehicle_status_s *status, orb_advert_t *mavlink_log_p
|
||||
}
|
||||
}
|
||||
|
||||
if (battery->warning == battery_status_s::BATTERY_WARNING_CRITICAL) {
|
||||
if (battery->warning == battery_status_s::BATTERY_WARNING_LOW) {
|
||||
preflight_ok = false;
|
||||
|
||||
if (reportFailures) {
|
||||
mavlink_log_critical(mavlink_log_pub, "ARMING DENIED: VERY LOW BATTERY");
|
||||
mavlink_log_critical(mavlink_log_pub, "ARMING DENIED: LOW BATTERY");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user