SLT Q100/Q200/MRT100: reverse throttle

This commit is contained in:
Pascal Langer 2018-09-11 15:51:28 -04:00
parent e5d9471b33
commit f4691d08cc
2 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 2
#define VERSION_REVISION 0
#define VERSION_PATCH_LEVEL 48
#define VERSION_PATCH_LEVEL 49
//******************
// Protocols

View File

@ -141,6 +141,8 @@ static void __attribute__((unused)) SLT_build_packet()
for (uint8_t i = 0; i < 4; ++i)
{
uint16_t v = convert_channel_10b(CH_AETR[i]);
if(sub_protocol>SLT_V2 && CH_AETR[i]==THROTTLE)
v=1023-v; // reverse throttle channel for Q100/Q200/MR100 protocols
packet[i] = v;
e = (e >> 2) | (uint8_t) ((v >> 2) & 0xC0);
}