From 0adb5cb39629774bfb8be70100d2fa8af35e1671 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Thu, 31 May 2012 12:05:47 -0700 Subject: [PATCH] =?UTF-8?q?Issue=20416:=20RC=5FChannel=20=E2=80=93=20Fix?= =?UTF-8?q?=20to=20make=20dead=5Fzones=20still=20output=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libraries/RC_Channel/RC_Channel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/RC_Channel/RC_Channel.cpp b/libraries/RC_Channel/RC_Channel.cpp index 93eae4751c..04db0415f8 100644 --- a/libraries/RC_Channel/RC_Channel.cpp +++ b/libraries/RC_Channel/RC_Channel.cpp @@ -247,6 +247,8 @@ RC_Channel::pwm_to_range() if(radio_in > radio_trim_low) return (_low + ((long)(_high - _low) * (long)(radio_in - radio_trim_low)) / (long)(radio_max - radio_trim_low)); + else if(_dead_zone > 0) + return 0; else return _low; }