Browse Source

AP_Arming: check actual battery instances then max possible instances

master
Tom Pittenger 9 years ago
parent
commit
8939c5308f
  1. 2
      libraries/AP_Arming/AP_Arming.cpp

2
libraries/AP_Arming/AP_Arming.cpp

@ -368,7 +368,7 @@ bool AP_Arming::battery_checks(bool report) @@ -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…
Cancel
Save