Package org.team1540.rooster.util.robots
Class PIDTuningRobot
- java.lang.Object
-
- edu.wpi.first.wpilibj.RobotBase
-
- edu.wpi.first.wpilibj.IterativeRobotBase
-
- edu.wpi.first.wpilibj.IterativeRobot
-
- org.team1540.rooster.util.robots.PIDTuningRobot
-
- All Implemented Interfaces:
AutoCloseable
public class PIDTuningRobot extends edu.wpi.first.wpilibj.IterativeRobot
Robot class to tune a Motion Magic PID controller. To change the motors to be tuned, change the preference values and then restart the robot code to allow the values to take effect. To disable a motor, set its motor ID to -1. Motor 1 will be configured as the master Talon and motors 2, 3, and 4 will be slaved to it in follower mode.
-
-
Constructor Summary
Constructors Constructor Description PIDTuningRobot()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
robotInit()
void
robotPeriodic()
void
teleopPeriodic()
-
Methods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase
autonomousInit, autonomousPeriodic, disabledInit, disabledPeriodic, loopFunc, teleopInit, testInit, testPeriodic
-
-
-
-
Field Detail
-
p
public double p
-
i
public double i
-
d
public double d
-
f
public double f
-
iZone
public int iZone
-
maxIAccum
public int maxIAccum
-
maxAccel
public int maxAccel
-
maxVel
public int maxVel
-
setpoint
public double setpoint
-
invertSensor
public boolean invertSensor
-
invertOutput
public boolean invertOutput
-
motor1ID
public int motor1ID
-
motor2ID
public int motor2ID
-
motor3ID
public int motor3ID
-
motor4ID
public int motor4ID
-
enablePID
public boolean enablePID
-
-
Method Detail
-
robotInit
public void robotInit()
- Overrides:
robotInit
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
teleopPeriodic
public void teleopPeriodic()
- Overrides:
teleopPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
robotPeriodic
public void robotPeriodic()
- Overrides:
robotPeriodic
in classedu.wpi.first.wpilibj.IterativeRobotBase
-
-