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:
Benoit3
2016-11-12 14:28:57 +01:00
committed by Lorenz Meier
parent 697d401b73
commit 83e9e1c382
5 changed files with 22 additions and 9 deletions
+3 -2
View File
@@ -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;
}
}