mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 20:08:11 +00:00
XK: fix twitch on other channels than rudder
This commit is contained in:
parent
3b1af68ed6
commit
1648a0780a
@ -19,7 +19,7 @@
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 3
|
#define VERSION_MINOR 3
|
||||||
#define VERSION_REVISION 2
|
#define VERSION_REVISION 2
|
||||||
#define VERSION_PATCH_LEVEL 77
|
#define VERSION_PATCH_LEVEL 78
|
||||||
|
|
||||||
#define MODE_SERIAL 0
|
#define MODE_SERIAL 0
|
||||||
|
|
||||||
|
@ -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)
|
static uint16_t __attribute__((unused)) XK_convert_channel(uint8_t num)
|
||||||
{
|
{
|
||||||
uint16_t val;
|
// Introduce deadband on all channels to prevent twitching
|
||||||
if(num==RUDDER)
|
//debug("val:%d",val);
|
||||||
{// introduce deadband on rudder to prevent twitching
|
uint16_t val=convert_channel_8b_limit_deadband(num,0x00,0x80, 0xFF, 40)<<2;
|
||||||
//debug("RUD:%d",val);
|
|
||||||
val=convert_channel_8b_limit_deadband(RUDDER,0x00,0x80, 0xFF, 40)<<2;
|
|
||||||
//debugln(",%d",val);
|
//debugln(",%d",val);
|
||||||
}
|
|
||||||
else
|
|
||||||
val=convert_channel_10b(num, false);
|
|
||||||
|
|
||||||
// 1FF..01=left, 00=center, 200..3FF=right
|
// 1FF..01=left, 00=center, 200..3FF=right
|
||||||
if(val==0x200)
|
if(val==0x200)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user