V911S/E119: add 6G_3D channel for P40 plane

This commit is contained in:
Pascal Langer
2021-10-24 09:57:24 +02:00
parent e247b8b9c1
commit b740f4cd24
4 changed files with 10 additions and 4 deletions

View File

@@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 3
#define VERSION_PATCH_LEVEL 2
#define VERSION_PATCH_LEVEL 3
#define MODE_SERIAL 0

View File

@@ -34,6 +34,7 @@
#define E119_FLAG_CALIB 0x40
// flags going to packet[2]
#define V911S_FLAG_CALIB 0x01
#define A220_FLAG_6G3D 0x04
static void __attribute__((unused)) V911S_send_packet()
{
@@ -70,8 +71,11 @@ static void __attribute__((unused)) V911S_send_packet()
packet[ 2]=GET_FLAG(CH5_SW,V911S_FLAG_CALIB); // long press on right button
}
else//E119
{
packet[ 1]=GET_FLAG(!CH6_SW,E119_FLAG_EXPERT) // short press on left button
|GET_FLAG( CH5_SW,E119_FLAG_CALIB); // short press on right button
packet[ 2]=GET_FLAG( CH7_SW,A220_FLAG_6G3D); // short press on right button
}
//packet[3..6]=trims TAER signed
uint16_t ch=convert_channel_16b_limit(THROTTLE ,0,0x7FF);