コード例 #1
0
  protected void initialize() {

    // Use standard mecanum drive
    drivebase.initMecanum(false);

    /*
     *  Enable drivebase rotational PID
     */
    // Set target angle
    m_pc.setSetpoint(m_target);

    // Throttle down the max allowed speed
    m_pc.setOutputRange(-0.5, 0.5);

    // Set tolerance around the target angle
    m_pc.setAbsoluteTolerance(5);

    // Reset and enable PID controller
    m_pc.reset();
    m_pc.enable();
  }
コード例 #2
0
 // Called just before this Command runs the first time
 protected void initialize() {
   // Get everything in a safe starting state.
   Robot.drivetrain.reset();
   pid.reset();
   pid.enable();
 }
コード例 #3
0
 public void stop() {
   turnController.reset();
   robotDrive.drive(0, 0);
 }