From fe71712b1807940358e7fbfe448056574a37d41b Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 30 Mar 2015 21:37:30 +0200 Subject: [PATCH] [Taranis] Trainer inputs were not working in mixers --- radio/src/mixer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/radio/src/mixer.cpp b/radio/src/mixer.cpp index de63bbc32..44377a898 100644 --- a/radio/src/mixer.cpp +++ b/radio/src/mixer.cpp @@ -653,7 +653,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms) if (md->srcRaw == 0) break; - uint8_t stickIndex = md->srcRaw - MIXSRC_Rud; + mixsrc_t stickIndex = md->srcRaw - MIXSRC_Rud; if (!(dirtyChannels & ((bitfield_channels_t)1 << md->destCh))) continue; @@ -709,10 +709,10 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms) else #endif { - int8_t srcRaw = MIXSRC_Rud + stickIndex; + mixsrc_t srcRaw = MIXSRC_Rud + stickIndex; v = getValue(srcRaw); srcRaw -= MIXSRC_CH1; - if (srcRaw>=0 && srcRaw<=MIXSRC_LAST_CH-MIXSRC_CH1 && md->destCh != srcRaw) { + if (srcRaw<=MIXSRC_LAST_CH-MIXSRC_CH1 && md->destCh != srcRaw) { if (dirtyChannels & ((bitfield_channels_t)1 << srcRaw) & (passDirtyChannels|~(((bitfield_channels_t) 1 << md->destCh)-1))) passDirtyChannels |= (bitfield_channels_t) 1 << md->destCh; if (srcRaw < md->destCh || pass > 0)