From 1fb115d3b1e610e6eebda219e87fa6c5b1bda85b Mon Sep 17 00:00:00 2001 From: bsongis Date: Fri, 2 May 2014 22:43:29 +0200 Subject: [PATCH] Fixes #1048 --- radio/src/opentx.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index e4423efe4..7f49ba785 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -960,7 +960,10 @@ int expo(int x, int k) void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS) { -#if !defined(PCBTARANIS) +#if defined(PCBTARANIS) + int16_t heliAnasCopy[4]; + memcpy(heliAnasCopy, heliAnas, sizeof(heliAnasCopy)); +#else int16_t anas2[NUM_INPUTS]; // values before expo, to ensure same expo base when multiple expo lines are used memcpy(anas2, anas, sizeof(anas2)); #endif @@ -984,9 +987,9 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS) v = ovwrValue; #if defined(HELI) else if (ed->srcRaw == MIXSRC_Ele) - v = heliAnas[ELE_STICK]; + v = heliAnasCopy[ELE_STICK]; else if (ed->srcRaw == MIXSRC_Ail) - v = heliAnas[AIL_STICK]; + v = heliAnasCopy[AIL_STICK]; #endif else { v = getValue(ed->srcRaw);