File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -198,6 +198,11 @@ typedef struct crsf_channels_s
198198 unsigned ch15 : 11 ;
199199} PACKED crsf_channels_t ;
200200
201+ /* *
202+ * Bits used in the byte following crsf_channels_t in the ExpressLRS extended CHANNELS_PACKED packet
203+ */
204+ #define CRSF_CHANNELS_STATUS_FLAG_ARM (1 << 0 )
205+
201206typedef struct deviceInformationPacket_s
202207{
203208 uint32_t serialNo;
Original file line number Diff line number Diff line change @@ -122,7 +122,9 @@ void TXModuleEndpoint::RcPacketToChannelsData(const crsf_header_t *message) // d
122122 // frame len 24 -> arming mode CH5: use channel 5 value
123123 // frame len 25 -> arming mode Switch: use commanded arming status in extra byte
124124 //
125- armCmd = message->frame_size == 24 ? CRSF_to_BIT (localChannelData[4 ]) : payload[readByteIndex];
125+ armCmd = message->frame_size == CRSF_FRAME_SIZE (sizeof (crsf_channels_t ))
126+ ? CRSF_to_BIT (localChannelData[AUX1])
127+ : (payload[readByteIndex] & CRSF_CHANNELS_STATUS_FLAG_ARM);
126128
127129 // monitoring arming state
128130 if (lastArmCmd != armCmd)
You can’t perform that action at this time.
0 commit comments