Plane: don't do battery failsafe when disarmed

This commit is contained in:
Andrew Tridgell 2015-08-14 12:41:19 +10:00 committed by Randy Mackay
parent abdd37ea2c
commit 5101e263fa
1 changed files with 3 additions and 1 deletions

View File

@ -75,7 +75,9 @@ void Plane::read_battery(void)
battery.read();
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();
}
}