Skip to content

Commit

Permalink
ManualControlSelector: correct parameter for any source according to …
Browse files Browse the repository at this point in the history
…documentation
  • Loading branch information
MaEtUgR committed Nov 4, 2021
1 parent d197803 commit f9f5842
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/modules/manual_control/ManualControlSelector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/modules/manual_control/ManualControlSelectorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f9f5842

Please sign in to comment.