From da81bda26d723798d47ffe44f1ec7a9f62d8241d Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 31 Mar 2014 12:08:03 +0200 Subject: [PATCH] Issue #852 fixed --- radio/src/opentx.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp index 49d430ac5..2286282ce 100644 --- a/radio/src/opentx.cpp +++ b/radio/src/opentx.cpp @@ -4343,26 +4343,26 @@ void doMixerCalculations() } else if (cs->func == LS_FUNC_STICKY) { PACK(typedef struct { - bool state; - bool last; + uint8_t state; + uint8_t last; }) cs_sticky_struct; cs_sticky_struct & lastValue = (cs_sticky_struct &)csLastValue[i]; bool before = lastValue.last & 0x01; if (lastValue.state) { bool now = getSwitch(cs->v2); if (now != before) { - lastValue.last ^= true; + lastValue.last ^= 1; if (!before) { - lastValue.state = false; + lastValue.state = 0; } } } else { bool now = getSwitch(cs->v1); if (before != now) { - lastValue.last ^= true; + lastValue.last ^= 1; if (!before) { - lastValue.state = true; + lastValue.state = 1; } } }