Plane: don't do battery failsafe when disarmed

This commit is contained in:
Andrew Tridgell 2015-08-14 12:41:19 +10:00
parent c8ecb1bac7
commit ac2e1552b2
1 changed files with 3 additions and 1 deletions

View File

@ -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();
} }
} }