diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index b35e3292..618de171 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 4 -#define VERSION_PATCH_LEVEL 71 +#define VERSION_PATCH_LEVEL 72 #define MODE_SERIAL 0 diff --git a/Multiprotocol/XK_ccnrf.ino b/Multiprotocol/XK_ccnrf.ino index 460312f3..baec9e62 100644 --- a/Multiprotocol/XK_ccnrf.ino +++ b/Multiprotocol/XK_ccnrf.ino @@ -128,10 +128,19 @@ static void __attribute__((unused)) XK_send_packet() if(Channel_data[CH5] > CHANNEL_MIN_COMMAND) packet[10] = 0x02; // 3D-Mode packet[10] |= GET_FLAG(CH6_SW ,0x04); // Low/High rate - packet[11] = GET_FLAG(CH7_SW ,0x10) // Back Flip - momentary switch - |GET_FLAG(CH8_SW ,0x20) // Left Roll - momentary switch - |GET_FLAG(CH9_SW ,0x04) // Right Roll - momentary switch - |GET_FLAG(CH10_SW,0x08); // Inverted Flight - latching switch + //Aerobatic flags + if(CH5_SW) // Only used in 6G mode + { + flags = GET_FLAG(CH7_SW ,0x10) // Back Flip - momentary switch + |GET_FLAG(CH8_SW ,0x20) // Left Roll - momentary switch + |GET_FLAG(CH9_SW ,0x04) // Right Roll - momentary switch + |GET_FLAG(CH10_SW,0x08); // Inverted Flight - latching switch + for(uint8_t i=0; i<8; i++) + if((flags & (1<