Class 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.IterativeRobot

        endCompetition, startCompetition
      • Methods inherited from class edu.wpi.first.wpilibj.IterativeRobotBase

        autonomousInit, autonomousPeriodic, disabledInit, disabledPeriodic, loopFunc, teleopInit, testInit, testPeriodic
      • Methods inherited from class edu.wpi.first.wpilibj.RobotBase

        close, getBooleanProperty, getMainThreadId, isAutonomous, isDisabled, isEnabled, isNewDataAvailable, isOperatorControl, isReal, isSimulation, isTest, startRobot, suppressExitWarning
    • 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
    • Constructor Detail

      • PIDTuningRobot

        public PIDTuningRobot()
    • Method Detail

      • robotInit

        public void robotInit()
        Overrides:
        robotInit in class edu.wpi.first.wpilibj.IterativeRobotBase
      • teleopPeriodic

        public void teleopPeriodic()
        Overrides:
        teleopPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase
      • robotPeriodic

        public void robotPeriodic()
        Overrides:
        robotPeriodic in class edu.wpi.first.wpilibj.IterativeRobotBase