mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-27 01:50:34 +08:00
fix(failure_injection): validate aux inputs to ensure they originate from RC sources
This commit is contained in:
1 parent
fc7ee4b8d2
commit
6eefe69c10
1 file changed
+2
-1
@@ -102,7 +102,8 @@ void FailureInjectionManager::Run()
|
||||
|
||||
float FailureInjectionManager::auxValue(const manual_control_setpoint_s &manual_control_setpoint, int32_t aux)
|
||||
{
|
||||
if (!manual_control_setpoint.valid) {
|
||||
// Aux inputs only come from RC; other sources (e.g. MAVLink joystick) report them as 0
|
||||
if (!manual_control_setpoint.valid || manual_control_setpoint.data_source != manual_control_setpoint_s::SOURCE_RC) {
|
||||
return NAN;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user