Skip to content

Commit

Permalink
reset zero heading when auto/robot code starts
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu-han-wang committed Mar 1, 2024
1 parent 526e244 commit 257462c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/jmhsrobotics/frc2024/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class Robot extends TimedRobot implements Logged {
@Override
public void robotInit() {
m_robotContainer = new RobotContainer();
m_robotContainer.getDriveSubsystem().zeroHeading();
setupLogs();
}

Expand Down Expand Up @@ -63,6 +64,7 @@ public void disabledExit() {

@Override
public void autonomousInit() {
m_robotContainer.getDriveSubsystem().zeroHeading();
autonomousCommand = m_robotContainer.getAutonomousCommand();

if (autonomousCommand != null) {
Expand Down

0 comments on commit 257462c

Please sign in to comment.