@@ -114,10 +114,9 @@ public RobotMap() {
114114 configSPX (dtLeftSlave );
115115 dtLeft = new SpeedControllerGroup (dtLeftMaster , dtLeftSlave );
116116
117- leftVelocityController = new VelocityPIDController (Robot .getConst ("VelocityLeftkP" , 1 ),
117+ leftVelocityController = new VelocityPIDController (Robot .getConst ("VelocityLeftkP" , 0 ),
118118 Robot .getConst ("VelocityLeftkI" , 0 ), Robot .getConst ("VelocityLeftkD" , 0 ),
119- 1 / Robot .getConst ("Max Low Speed" , 84 ), leftEncRate , dtLeft );
120- // leftVelocityController.enable();
119+ /*1 / Robot.getConst("Max Low Speed", 84)*/ Robot .getConst ("VelocityLeftkF" , 1 /84.0 ), leftEncRate , dtLeft );
121120 leftVelocityController .setInputRange (-Robot .getConst ("Max High Speed" , 204 ),
122121 Robot .getConst ("Max High Speed" , 204 ));
123122 leftVelocityController .setOutputRange (-1.0 , 1.0 );
@@ -138,22 +137,20 @@ public RobotMap() {
138137 dtRightSlave = new WPI_VictorSPX (getPort ("RightVictorSPXSlave" , 3 ));
139138 configSPX (dtRightSlave );
140139 dtRight = new SpeedControllerGroup (dtRightMaster , dtRightSlave );
141- // dtRight.setInverted(true);
142140
143- rightVelocityController = new VelocityPIDController (Robot .getConst ("VelocityRightkP" , 1 ),
141+ rightVelocityController = new VelocityPIDController (Robot .getConst ("VelocityRightkP" , 0 ),
144142 Robot .getConst ("VelocityRightkI" , 0 ), Robot .getConst ("VelocityRightkD" , 0 ),
145- 1 / Robot .getConst ("Max Low Speed" , 84 ), rightEncRate , dtRight );
146- // rightVelocityController.enable();
143+ /*1 / Robot.getConst("Max Low Speed", 84)*/ Robot .getConst ("VelocityRightkF" , 1 /84.0 ), rightEncRate , dtRight );
147144 rightVelocityController .setInputRange (-Robot .getConst ("Max High Speed" , 204 ),
148145 Robot .getConst ("Max High Speed" , 204 ));
149146 rightVelocityController .setOutputRange (-1.0 , 1.0 );
150147 rightVelocityController .setContinuous (false );
151148 rightVelocityController .setAbsoluteTolerance (Robot .getConst ("VelocityToleranceRight" , 2 ));
152149
153- // robotDrive = new DifferentialDrive(leftVelocityController, rightVelocityController);
154- robotDrive = new DifferentialDrive (dtLeft , dtRight );
150+ robotDrive = new DifferentialDrive (leftVelocityController , rightVelocityController );
151+ // robotDrive = new DifferentialDrive(dtLeft, dtRight);
155152
156- // robotDrive.setMaxOutput(Robot.getConst("Max High Speed", 204));
153+ robotDrive .setMaxOutput (Robot .getConst ("Max High Speed" , 204 ));
157154
158155 distEncAvg = new PIDSourceAverage (leftEncDist , rightEncDist );
159156 fancyGyro = new AHRS (SerialPort .Port .kMXP );
0 commit comments