+ this.direction = direction;
+ this.maxTimeOut = maxTimeOut;
+ this.target = Math.abs(angle);
+
+ if (angle > 90) {
+ this.gyroP = driveTrain.largeTurnP;
+ this.gyroI = driveTrain.largeTurnI;
+ this.gyroD = driveTrain.largeTurnD;
+ } else {
+ this.gyroP = driveTrain.smallTurnP;
+ this.gyroI = driveTrain.smallTurnI;
+ this.gyroD = driveTrain.smallTurnD;
+ }
+
+ this.gyroController = new PIDController(this.gyroP, this.gyroI, this.gyroD);
+ this.gyroController.setDoneRange(1);
+ this.gyroController.setMinDoneCycles(5);