mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
ManualControlSelector: correct parameter for any source according to documentation
This commit is contained in:
@@ -72,7 +72,7 @@ bool ManualControlSelector::isInputValid(const manual_control_setpoint_s &input,
|
||||
|| input.data_source == manual_control_setpoint_s::SOURCE_MAVLINK_3
|
||||
|| input.data_source == manual_control_setpoint_s::SOURCE_MAVLINK_4
|
||||
|| input.data_source == manual_control_setpoint_s::SOURCE_MAVLINK_5);
|
||||
const bool source_any_matched = (_rc_in_mode == 3);
|
||||
const bool source_any_matched = (_rc_in_mode == 2);
|
||||
|
||||
return sample_from_the_past && sample_newer_than_timeout
|
||||
&& (source_rc_matched || source_mavlink_matched || source_any_matched);
|
||||
|
||||
@@ -131,7 +131,7 @@ TEST(ManualControlSelector, MavlinkInputOnly)
|
||||
TEST(ManualControlSelector, AutoInput)
|
||||
{
|
||||
ManualControlSelector selector;
|
||||
selector.setRcInMode(3);
|
||||
selector.setRcInMode(2);
|
||||
selector.setTimeout(500_ms);
|
||||
|
||||
uint64_t timestamp = some_time;
|
||||
|
||||
Reference in New Issue
Block a user