From 0cef8ea12d421f4b1c62e8f5c907fcda8b76b5de Mon Sep 17 00:00:00 2001 From: Pat Hickey Date: Tue, 28 Aug 2012 17:12:41 -0700 Subject: [PATCH] APM_RC_APM1.cpp: Bugfix on mapping of SetFastOutputChannels to ICR reg * Previously had the ICR register for ch1/2/9 (on timer5) swapped with ch3/4/10 (on timer1). * This bug probably didn't make a difference in operation since SetFastOutputChannels is typically only used for copters, where at least CH1,2,3,4 would be set to fast all at once. --- libraries/APM_RC/APM_RC_APM1.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/APM_RC/APM_RC_APM1.cpp b/libraries/APM_RC/APM_RC_APM1.cpp index 1d6d1f8124..ca8f635452 100644 --- a/libraries/APM_RC/APM_RC_APM1.cpp +++ b/libraries/APM_RC/APM_RC_APM1.cpp @@ -271,11 +271,11 @@ void APM_RC_APM1::SetFastOutputChannels(uint32_t chmask, uint16_t speed_hz) uint16_t icr = _map_speed(speed_hz); if ((chmask & ( _BV(CH_1) | _BV(CH_2) | _BV(CH_9))) != 0) { - ICR1 = icr; + ICR5 = icr; } if ((chmask & ( _BV(CH_3) | _BV(CH_4) | _BV(CH_10))) != 0) { - ICR5 = icr; + ICR1 = icr; } #if 0