ManualControlSelector: correct parameter for any source according to documentation

This commit is contained in:
Matthias Grob 2021-11-03 12:02:52 +01:00
parent fabf865411
commit 4aa0756d08
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;