forked from Archive/PX4-Autopilot
ManualControlSelector: correct parameter for any source according to documentation
This commit is contained in:
parent
fabf865411
commit
4aa0756d08
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue