|
|
|
@ -246,7 +246,7 @@ extern const AP_HAL::HAL& hal;
@@ -246,7 +246,7 @@ extern const AP_HAL::HAL& hal;
|
|
|
|
|
bool AP_Frsky_SPortParser::should_process_packet(const uint8_t *packet, bool discard_duplicates) |
|
|
|
|
{ |
|
|
|
|
// check for duplicate packets
|
|
|
|
|
if (discard_duplicates && _parse_state.last_packet != nullptr) { |
|
|
|
|
if (discard_duplicates) { |
|
|
|
|
/*
|
|
|
|
|
Note: the polling byte packet[0] should be ignored in the comparison |
|
|
|
|
because we might get the same packet with different polling bytes |
|
|
|
@ -323,10 +323,10 @@ bool AP_Frsky_SPortParser::get_packet(AP_Frsky_SPort::sport_packet_t &sport_pack
@@ -323,10 +323,10 @@ bool AP_Frsky_SPortParser::get_packet(AP_Frsky_SPort::sport_packet_t &sport_pack
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const AP_Frsky_SPort::sport_packet_t sp { |
|
|
|
|
_parse_state.rx_buffer[0], |
|
|
|
|
{ _parse_state.rx_buffer[0], |
|
|
|
|
_parse_state.rx_buffer[1], |
|
|
|
|
le16toh_ptr(&_parse_state.rx_buffer[2]), |
|
|
|
|
le32toh_ptr(&_parse_state.rx_buffer[4]) |
|
|
|
|
le32toh_ptr(&_parse_state.rx_buffer[4]) }, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
sport_packet = sp; |
|
|
|
|