mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 05:03:35 +08:00
Prevented unhealthy RC input from propagating through the system
This commit is contained in:
+7
-1
@@ -132,7 +132,13 @@ comms_main(void)
|
||||
/* populate the report */
|
||||
for (int i = 0; i < system_state.rc_channels; i++)
|
||||
report.rc_channel[i] = system_state.rc_channel_data[i];
|
||||
report.channel_count = system_state.rc_channels;
|
||||
|
||||
if (system_state.sbus_input_ok || system_state.dsm_input_ok || system_state.ppm_input_ok) {
|
||||
report.channel_count = system_state.rc_channels;
|
||||
} else {
|
||||
report.channel_count = 0;
|
||||
}
|
||||
|
||||
report.armed = system_state.armed;
|
||||
|
||||
/* and send it */
|
||||
|
||||
Reference in New Issue
Block a user