From 0b1f2174206d7d9153602096f7173c6beeefa053 Mon Sep 17 00:00:00 2001 From: Robert Lefebvre Date: Wed, 4 Feb 2015 18:39:12 -0500 Subject: [PATCH] Copter: Add PreArm check for radio trims. --- ArduCopter/motors.pde | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ArduCopter/motors.pde b/ArduCopter/motors.pde index 8d2e4a4e27..79df489de2 100644 --- a/ArduCopter/motors.pde +++ b/ArduCopter/motors.pde @@ -475,6 +475,16 @@ static void pre_arm_rc_checks() return; } + // check channels 1 & 2 have trim >= 1300 and <= 1700 + if (g.rc_1.radio_trim < 1300 || g.rc_1.radio_trim > 1700 || g.rc_2.radio_trim < 1300 || g.rc_2.radio_trim > 1700) { + return; + } + + // check channels 3 & 4 have trim >= 1300 and <= 1700 + if (g.rc_3.radio_trim < 1300 || g.rc_3.radio_trim > 1700 || g.rc_4.radio_trim < 1300 || g.rc_4.radio_trim > 1700) { + return; + } + // if we've gotten this far rc is ok set_pre_arm_rc_check(true); }