Skip to content

Commit

Permalink
🔥 (BehaviorKit): Remove unused spin behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Mar 18, 2024
1 parent 9da3fb3 commit 617322f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 35 deletions.
3 changes: 0 additions & 3 deletions libs/BehaviorKit/include/BehaviorKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class BehaviorKit
// nothing do to
}

void spinLeft(float speed);
void spinRight(float speed);

void launching();
void sleeping();
void waiting();
Expand Down
12 changes: 0 additions & 12 deletions libs/BehaviorKit/source/BehaviorKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ namespace leka {

using namespace std::chrono;

void BehaviorKit::spinLeft(float speed)
{
_motor_left.spin(Rotation::clockwise, speed);
_motor_right.spin(Rotation::clockwise, speed);
}

void BehaviorKit::spinRight(float speed)
{
_motor_left.spin(Rotation::counterClockwise, speed);
_motor_right.spin(Rotation::counterClockwise, speed);
}

void BehaviorKit::launching()
{
_videokit.displayImage(fs::home::img::system::robot_misc_splash_screen_large_400);
Expand Down
20 changes: 0 additions & 20 deletions libs/BehaviorKit/tests/BehaviorKit_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,6 @@ TEST_F(BehaviorKitTest, initialization)
ASSERT_NE(&behaviorkit, nullptr);
}

TEST_F(BehaviorKitTest, spinLeftAnySpeed)
{
auto expected_speed = 0.7;

EXPECT_CALL(mock_motor_left, spin(Rotation::clockwise, expected_speed));
EXPECT_CALL(mock_motor_right, spin(Rotation::clockwise, expected_speed));

behaviorkit.spinLeft(expected_speed);
}

TEST_F(BehaviorKitTest, spinRightAnySpeed)
{
auto expected_speed = 0.3;

EXPECT_CALL(mock_motor_left, spin(Rotation::counterClockwise, expected_speed));
EXPECT_CALL(mock_motor_right, spin(Rotation::counterClockwise, expected_speed));

behaviorkit.spinRight(expected_speed);
}

TEST_F(BehaviorKitTest, launching)
{
EXPECT_CALL(mock_videokit, displayImage);
Expand Down

0 comments on commit 617322f

Please sign in to comment.