Skip to content

Commit

Permalink
Merge pull request #41 from rock-control/initialize_expected_inputs
Browse files Browse the repository at this point in the history
fix: initialize ExpectedInputs fields
  • Loading branch information
doudou authored Apr 28, 2022
2 parents 711258f + 03090a1 commit 81d89c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions 6dControl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ namespace auv_control{
struct ExpectedInputs{
bool linear[3];
bool angular[3];

ExpectedInputs() {
for (int i = 0; i < 3; ++i) {
linear[i] = angular[i] = true;
}
}
};

struct PIDState : public motor_controller::PIDState
Expand Down
4 changes: 2 additions & 2 deletions test/test_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

before do
task.expected_inputs do |v|
v.linear[0] = 1
v.linear[1] = 1
v.linear = [true, true, false]
v.angular = [false, false, false]
end
end

Expand Down

0 comments on commit 81d89c2

Please sign in to comment.