Skip to content

Commit

Permalink
fix: initialize ExpectedInputs fields
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed Apr 13, 2022
1 parent d3f3be9 commit 03090a1
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 03090a1

Please sign in to comment.