AP_Arming: check actual battery instances then max possible instances
This commit is contained in:
parent
3ed2fafefa
commit
8939c5308f
@ -368,7 +368,7 @@ bool AP_Arming::battery_checks(bool report)
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < AP_BATT_MONITOR_MAX_INSTANCES; i++) {
|
||||
for (int i = 0; i < _battery.num_instances(); i++) {
|
||||
if ((_min_voltage[i] > 0.0f) && (_battery.voltage(i) < _min_voltage[i])) {
|
||||
if (report) {
|
||||
GCS_MAVLINK::send_statustext_all(MAV_SEVERITY_CRITICAL, "PreArm: Battery %d voltage %.1f below minimum %.1f",
|
||||
|
Loading…
Reference in New Issue
Block a user