From ffe1c3f737a8e2930a6be512f5bbeb8c535ce7b5 Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 26 Mar 2014 08:59:45 +0100 Subject: [PATCH] Issue #857 - Offset Companion conversion fixed --- companion/src/firmwares/opentx/opentxeeprom.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp index 20173bfcd..77b1ba264 100644 --- a/companion/src/firmwares/opentx/opentxeeprom.cpp +++ b/companion/src/firmwares/opentx/opentxeeprom.cpp @@ -943,6 +943,12 @@ class MixField: public TransformedField { concatGvarParam(mix.weight, _weight, _weightMode, board, version); concatGvarParam(mix.sOffset, _offset, _offsetMode, board, version); } + + if (IS_TARANIS(board) || version < 216) { + if (mix.sOffset >= -500 && mix.sOffset <= 500 && mix.weight >= -500 && mix.weight <= 500) { + mix.sOffset = ((mix.sOffset * mix.weight) + 50) / 100; + } + } } protected: