mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
added pid controller
This commit is contained in:
@@ -7,9 +7,13 @@
|
||||
|
||||
package frc4388.robot;
|
||||
|
||||
import com.ctre.phoenix.sensors.WPI_Pigeon2;
|
||||
|
||||
import edu.wpi.first.wpilibj.TimedRobot;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import edu.wpi.first.wpilibj2.command.Command;
|
||||
import edu.wpi.first.wpilibj2.command.CommandScheduler;
|
||||
import frc4388.utility.RobotGyro;
|
||||
import frc4388.utility.RobotTime;
|
||||
|
||||
/**
|
||||
@@ -106,6 +110,8 @@ public class Robot extends TimedRobot {
|
||||
m_autonomousCommand.cancel();
|
||||
}
|
||||
m_robotTime.startMatchTime();
|
||||
|
||||
m_robotContainer.gyroRef.reset();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +119,9 @@ public class Robot extends TimedRobot {
|
||||
*/
|
||||
@Override
|
||||
public void teleopPeriodic() {
|
||||
|
||||
SmartDashboard.putNumber("yaw", m_robotContainer.gyroRef.getAngle());
|
||||
SmartDashboard.putNumber("pitch", m_robotContainer.gyroRef.getPitch());
|
||||
SmartDashboard.putNumber("roll", m_robotContainer.gyroRef.getRoll());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user