From 670bb0a0c5b6cec69dd6537c670231133d619568 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sat, 1 Feb 2014 16:23:57 +0100 Subject: [PATCH] Avoid recursive calls to getTrimValue --- radio/src/opentx.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 921ab3384..f97e47537 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -1666,10 +1666,9 @@ int getTrimValue(uint8_t phase, uint8_t idx) } else { phase = p; - if (v.mode % 2 == 0) - result = 0; - else + if (v.mode % 2 != 0) { result += v.value; + } } } }