From 1648a0780a4c6e5b0870b7734afa0dfeab0672e8 Mon Sep 17 00:00:00 2001 From: Pascal Langer Date: Sat, 24 Apr 2021 12:54:17 +0200 Subject: [PATCH] XK: fix twitch on other channels than rudder --- Multiprotocol/Multiprotocol.h | 2 +- Multiprotocol/XK_ccnrf.ino | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 8d5a31a..4a08ad5 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 2 -#define VERSION_PATCH_LEVEL 77 +#define VERSION_PATCH_LEVEL 78 #define MODE_SERIAL 0 diff --git a/Multiprotocol/XK_ccnrf.ino b/Multiprotocol/XK_ccnrf.ino index 16e7f37..879ca33 100644 --- a/Multiprotocol/XK_ccnrf.ino +++ b/Multiprotocol/XK_ccnrf.ino @@ -29,15 +29,10 @@ Multiprotocol is distributed in the hope that it will be useful, static uint16_t __attribute__((unused)) XK_convert_channel(uint8_t num) { - uint16_t val; - if(num==RUDDER) - {// introduce deadband on rudder to prevent twitching - //debug("RUD:%d",val); - val=convert_channel_8b_limit_deadband(RUDDER,0x00,0x80, 0xFF, 40)<<2; - //debugln(",%d",val); - } - else - val=convert_channel_10b(num, false); + // Introduce deadband on all channels to prevent twitching + //debug("val:%d",val); + uint16_t val=convert_channel_8b_limit_deadband(num,0x00,0x80, 0xFF, 40)<<2; + //debugln(",%d",val); // 1FF..01=left, 00=center, 200..3FF=right if(val==0x200)