From 2b5f6e266852d63d0847164e5da5641248b9e812 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sat, 13 Jul 2013 21:38:03 +0900 Subject: [PATCH] Copter: pre-arm checks for rc ch 1~4 min and max --- ArduCopter/motors.pde | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ArduCopter/motors.pde b/ArduCopter/motors.pde index 317e50c9f7..0cbaa9f934 100644 --- a/ArduCopter/motors.pde +++ b/ArduCopter/motors.pde @@ -312,8 +312,13 @@ static void pre_arm_rc_checks() return; } - // check if throttle min is reasonable - if(g.rc_3.radio_min > 1300) { + // check channels 1 & 2 have min <= 1300 and max >= 1700 + if (g.rc_1.radio_min > 1300 || g.rc_1.radio_max < 1700 || g.rc_2.radio_min > 1300 || g.rc_2.radio_max < 1700) { + return; + } + + // check channels 3 & 4 have min <= 1300 and max >= 1700 + if (g.rc_3.radio_min > 1300 || g.rc_3.radio_max < 1700 || g.rc_4.radio_min > 1300 || g.rc_4.radio_max < 1700) { return; }