mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 11:33:33 +08:00
The goal of this patch is to allow compatibility with GR12/GR16/GR24 graupner receiver by :
- allowing decoding of SUMD frame with failsafe bit set - updating stack failsafe state with the sumd failsafe info Refer to #5817 issue
This commit is contained in:
@@ -1415,6 +1415,7 @@ PX4FMU::cycle()
|
||||
if (newBytes > 0) {
|
||||
// parse new data
|
||||
uint8_t sumd_rssi, rx_count;
|
||||
bool sumd_failsafe;
|
||||
|
||||
rc_updated = false;
|
||||
|
||||
@@ -1422,14 +1423,14 @@ PX4FMU::cycle()
|
||||
/* set updated flag if one complete packet was parsed */
|
||||
sumd_rssi = RC_INPUT_RSSI_MAX;
|
||||
rc_updated = (OK == sumd_decode(_rcs_buf[i], &sumd_rssi, &rx_count,
|
||||
&raw_rc_count, raw_rc_values, input_rc_s::RC_INPUT_MAX_CHANNELS));
|
||||
&raw_rc_count, raw_rc_values, input_rc_s::RC_INPUT_MAX_CHANNELS, &sumd_failsafe));
|
||||
}
|
||||
|
||||
if (rc_updated) {
|
||||
// we have a new SUMD frame. Publish it.
|
||||
_rc_in.input_source = input_rc_s::RC_INPUT_SOURCE_PX4FMU_SUMD;
|
||||
fill_rc_in(raw_rc_count, raw_rc_values, _cycle_timestamp,
|
||||
false, false, frame_drops, sumd_rssi);
|
||||
false, sumd_failsafe, frame_drops, sumd_rssi);
|
||||
_rc_scan_locked = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user