src/main/java/frc/robot/commands/ClimbPID.java
// Called when the command is initially scheduled.
Called when the command is initially scheduled.
Called when the command is initially scheduled .
@Override
  public void initialize() {
    m_drive.zeroEncoders();
    m_drive.m_leftMotorPID.setP(DriveConstants.CLIMB_kP);
    m_drive.m_leftMotorPID.setI(DriveConstants.CLIMB_kI);
    m_drive.m_leftMotorPID.setD(DriveConstants.CLIMB_kD);
    m_drive.m_leftMotorPID.setOutputRange(DriveConstants.CLIMB_MIN_OUTPUT, DriveConstants.CLIMB_MAX_OUTPUT);
    m_drive.m_rightMotorPID.setP(DriveConstants.CLIMB_kP);
    m_drive.m_rightMotorPID.setI(DriveConstants.CLIMB_kI);
    m_drive.m_rightMotorPID.setD(DriveConstants.CLIMB_kD);
    m_drive.m_rightMotorPID.setOutputRange(DriveConstants.CLIMB_MIN_OUTPUT, DriveConstants.CLIMB_MAX_OUTPUT);
    leftGoal = m_drive.inchesToRevs(inch_goal);
    rightGoal = m_drive.inchesToRevs(inch_goal);
    System.out.println("CLIMB PID INIT");
  }
@ Override public void initialize ( ) { m_drive . zeroEncoders ( ) ; m_drive . m_leftMotorPID . setP ( DriveConstants . CLIMB_kP ) ; m_drive . m_leftMotorPID . setI ( DriveConstants . CLIMB_kI ) ; m_drive . m_leftMotorPID . setD ( DriveConstants . CLIMB_kD ) ; m_drive . m_leftMotorPID . setOutputRange ( DriveConstants . CLIMB_MIN_OUTPUT , DriveConstants . CLIMB_MAX_OUTPUT ) ; m_drive . m_rightMotorPID . setP ( DriveConstants . CLIMB_kP ) ; m_drive . m_rightMotorPID . setI ( DriveConstants . CLIMB_kI ) ; m_drive . m_rightMotorPID . setD ( DriveConstants . CLIMB_kD ) ; m_drive . m_rightMotorPID . setOutputRange ( DriveConstants . CLIMB_MIN_OUTPUT , DriveConstants . CLIMB_MAX_OUTPUT ) ; leftGoal = m_drive . inchesToRevs ( inch_goal ) ; rightGoal = m_drive . inchesToRevs ( inch_goal ) ; System . out . println ( "CLIMB PID INIT" ) ; }
Called when the command is initially scheduled.
Called when the command is initially scheduled .
// m_drive.motorDistanceTwo(leftGoal, rightGoal);