From 1a724ded2ae760fb28804d7eee5e99c84d0ecca3 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 20 Sep 2017 12:18:37 +1000 Subject: [PATCH] Plane: AP_Arming: sanity-check fs timeout parameters --- ArduPlane/AP_Arming.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ArduPlane/AP_Arming.cpp b/ArduPlane/AP_Arming.cpp index 23a17378f8..e7f5283cb6 100644 --- a/ArduPlane/AP_Arming.cpp +++ b/ArduPlane/AP_Arming.cpp @@ -35,6 +35,13 @@ bool AP_Arming_Plane::pre_arm_checks(bool report) // Check airspeed sensor ret &= AP_Arming::airspeed_checks(report); + if (plane.g.long_fs_timeout < plane.g.short_fs_timeout) { + if (report) { + gcs().send_text(MAV_SEVERITY_CRITICAL, "PreArm: FS_LONG_TIMEOUT < FS_SHORT_TIMEOUT"); + } + ret = false; + } + if (plane.aparm.roll_limit_cd < 300) { if (report) { gcs().send_text(MAV_SEVERITY_CRITICAL, "PreArm: LIM_ROLL_CD too small (%u)", plane.aparm.roll_limit_cd);