From af1f5f12354304a198f72316d933cb2e10b4b836 Mon Sep 17 00:00:00 2001 From: Caleb Chalmers Date: Thu, 23 May 2024 19:48:27 +0000 Subject: [PATCH] Fix flywheel commads not using setVelocity --- .../src/subsystems/flywheel/command_flywheel_off.cpp | 2 +- .../src/subsystems/flywheel/command_rotate_flywheel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ut-robomaster/src/subsystems/flywheel/command_flywheel_off.cpp b/ut-robomaster/src/subsystems/flywheel/command_flywheel_off.cpp index 23374853..1787b29c 100644 --- a/ut-robomaster/src/subsystems/flywheel/command_flywheel_off.cpp +++ b/ut-robomaster/src/subsystems/flywheel/command_flywheel_off.cpp @@ -5,7 +5,7 @@ namespace commands void CommandFlywheelOff::initialize() {} -void CommandFlywheelOff::execute() { flywheel->setLaunchSpeed(0.0f); } +void CommandFlywheelOff::execute() { flywheel->setVelocity(0.0f); } void CommandFlywheelOff::end(bool) {} diff --git a/ut-robomaster/src/subsystems/flywheel/command_rotate_flywheel.cpp b/ut-robomaster/src/subsystems/flywheel/command_rotate_flywheel.cpp index ffe64e06..e71d1f5d 100644 --- a/ut-robomaster/src/subsystems/flywheel/command_rotate_flywheel.cpp +++ b/ut-robomaster/src/subsystems/flywheel/command_rotate_flywheel.cpp @@ -3,11 +3,11 @@ namespace commands { -void CommandRotateFlywheel::initialize() { flywheel->setLaunchSpeed(FLYWHEEL_SPEED); } +void CommandRotateFlywheel::initialize() { flywheel->setVelocity(FLYWHEEL_SPEED); } void CommandRotateFlywheel::execute() {} -void CommandRotateFlywheel::end(bool) { flywheel->setLaunchSpeed(0.0f); } +void CommandRotateFlywheel::end(bool) { flywheel->setVelocity(0.0f); } bool CommandRotateFlywheel::isFinished() const { return false; } } // namespace commands \ No newline at end of file