From 5101e263fae65214b4e42d4140606f2fe8867121 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Aug 2015 12:41:19 +1000 Subject: [PATCH] Plane: don't do battery failsafe when disarmed --- ArduPlane/sensors.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArduPlane/sensors.cpp b/ArduPlane/sensors.cpp index 0252c89856..0f472960c0 100644 --- a/ArduPlane/sensors.cpp +++ b/ArduPlane/sensors.cpp @@ -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(); } }