Skip to content

Commit b5e140b

Browse files
authored
Fix MoFly sub-protocol mode, rate and aux switch encoding (#1185)
1 parent 90dcf03 commit b5e140b

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Multiprotocol/XK_ccnrf.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,15 @@ static void __attribute__((unused)) XK_send_packet()
118118
memset(&packet[4],0x40,3); // Trims centered
119119
//0x00 default MM Mode
120120
if(CH5_SW)
121-
packet[10] = 0x02; // 6G Mode
121+
packet[10] = 0x01; // 6G Mode
122122
else
123123
if(Channel_data[CH5] > CHANNEL_MIN_COMMAND)
124-
packet[10] = 0x01; // 3D-Mode
125-
packet[10] |= GET_FLAG(CH6_SW ,0xFC); // Low/High rate
124+
packet[10] = 0x02; // 3D-Mode
125+
packet[10] |= GET_FLAG(CH6_SW ,0x04); // Low/High rate
126126
packet[11] = GET_FLAG(CH7_SW ,0x10) // Back Flip - momentary switch
127127
|GET_FLAG(CH8_SW ,0x20) // Left Roll - momentary switch
128-
|GET_FLAG(CH9_SW ,0x40) // Right Roll - momentary switch
129-
|GET_FLAG(CH10_SW,0x80); // Inverted Flight - latching switch
128+
|GET_FLAG(CH9_SW ,0x04) // Right Roll - momentary switch
129+
|GET_FLAG(CH10_SW,0x08); // Inverted Flight - latching switch
130130
}
131131

132132
crc=packet[0];

0 commit comments

Comments
 (0)