Skip to content

Commit

Permalink
Fix turret snapping on after remote disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
calebchalmers committed Nov 19, 2024
1 parent 504e5b6 commit 2a0c973
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ut-robomaster/src/subsystems/turret/command_move_turret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ void CommandMoveTurret::initialize() { isCalibrated = false; }

void CommandMoveTurret::execute()
{
if (!isCalibrated && turret->getIsCalibrated())
if (drivers->isKillSwitched())
{
isCalibrated = false;
}
else if (!isCalibrated && turret->getIsCalibrated())
{
yaw = turret->getCurrentLocalYaw() + turret->getChassisYaw();
pitch = turret->getCurrentLocalPitch();
Expand Down

0 comments on commit 2a0c973

Please sign in to comment.