forked from Archive/PX4-Autopilot
fix bug in rssi assignment
This commit is contained in:
parent
8116f15d95
commit
de39b63402
|
@ -713,8 +713,12 @@ void PX4FMU::fill_rc_in(uint16_t raw_rc_count,
|
|||
_rc_in.timestamp_last_signal = _rc_in.timestamp_publication;
|
||||
_rc_in.rc_ppm_frame_length = 0;
|
||||
|
||||
/* don't touch rssi if no value was provided */
|
||||
if (rssi >= 0) {
|
||||
/* fake rssi if no value was provided */
|
||||
if (rssi == -1) {
|
||||
_rc_in.rssi =
|
||||
(!frame_drop) ? RC_INPUT_RSSI_MAX : (RC_INPUT_RSSI_MAX / 2);
|
||||
|
||||
} else {
|
||||
_rc_in.rssi = rssi;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue