mirror of https://github.com/ArduPilot/ardupilot
Plane: don't do battery failsafe when disarmed
This commit is contained in:
parent
c8ecb1bac7
commit
ac2e1552b2
|
@ -75,7 +75,9 @@ void Plane::read_battery(void)
|
||||||
battery.read();
|
battery.read();
|
||||||
compass.set_current(battery.current_amps());
|
compass.set_current(battery.current_amps());
|
||||||
|
|
||||||
if (!usb_connected && battery.exhausted(g.fs_batt_voltage, g.fs_batt_mah)) {
|
if (!usb_connected &&
|
||||||
|
hal.util->get_soft_armed() &&
|
||||||
|
battery.exhausted(g.fs_batt_voltage, g.fs_batt_mah)) {
|
||||||
low_battery_event();
|
low_battery_event();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue