Skip to content
This repository was archived by the owner on Sep 14, 2019. It is now read-only.

Commit 787ea5a

Browse files
Disable test buttons
1 parent dccf8a7 commit 787ea5a

File tree

4 files changed

+27
-25
lines changed

4 files changed

+27
-25
lines changed

Robot2018/src/main/java/org/usfirst/frc/team199/Robot2018/OI.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,21 @@ public OI(Robot robot) {
8888
invertDTButton = new JoystickButton(leftJoy, getButton("Invert Drivetrain", 3));
8989
invertDTButton.whenPressed(new InvertDrivetrain());
9090

91-
pIDMoveButton = new JoystickButton(leftJoy, getButton("PID Move", 7));
92-
pIDMoveButton
93-
.whenPressed(new PIDMove(Robot.sd.getConst("Move Targ", 24), Robot.dt, Robot.sd, RobotMap.distEncAvg));
94-
pIDTurnButton = new JoystickButton(leftJoy, getButton("PID Turn", 8));
95-
pIDTurnButton
96-
.whenReleased(new PIDTurn(Robot.getConst("Turn Targ", 90), Robot.dt, Robot.sd, RobotMap.fancyGyro));
97-
98-
resetEncButton = new JoystickButton(leftJoy, getButton("Reset Dist Enc", 10));
99-
resetEncButton.whenPressed(new ResetEncoders());
100-
101-
findTurnTimeConstantButton = new JoystickButton(leftJoy, getButton("Find Turn Time Constant", 11));
91+
// commented out for safety reasons
92+
// pIDMoveButton = new JoystickButton(leftJoy, getButton("PID Move", 7));
93+
// pIDMoveButton
94+
// .whenPressed(new PIDMove(Robot.sd.getConst("Move Targ", 24), Robot.dt, Robot.sd, RobotMap.distEncAvg));
95+
// pIDTurnButton = new JoystickButton(leftJoy, getButton("PID Turn", 8));
96+
// pIDTurnButton
97+
// .whenReleased(new PIDTurn(Robot.getConst("Turn Targ", 90), Robot.dt, Robot.sd, RobotMap.fancyGyro));
98+
99+
// resetEncButton = new JoystickButton(leftJoy, getButton("Reset Dist Enc", 10));
100+
// resetEncButton.whenPressed(new ResetEncoders());
101+
102+
// findTurnTimeConstantButton = new JoystickButton(leftJoy, getButton("Find Turn Time Constant", 11));
102103
// the command will only run in test mode
103-
findTurnTimeConstantButton
104-
.whenPressed(new FindTurnTimeConstant(robot, Robot.dt, Robot.rmap.fancyGyro, Robot.sd));
104+
// findTurnTimeConstantButton
105+
// .whenPressed(new FindTurnTimeConstant(robot, Robot.dt, Robot.rmap.fancyGyro, Robot.sd));
105106

106107
testLiftPID = new JoystickButton(leftJoy, getButton("Test Lift PID", 5));
107108
testLiftPID.whenPressed(
@@ -118,10 +119,10 @@ public OI(Robot robot) {
118119
updateEncoderDPPButton = new JoystickButton(rightJoy, getButton("Get Encoder Dist Per Pulse", 9));
119120
updateEncoderDPPButton.whenPressed(new SetDistancePerPulse());
120121

121-
moveLiftUpButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Up", 10));
122-
moveLiftUpButton.whileHeld(new MoveLift(Robot.lift, true));
123-
moveLiftDownButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Down", 11));
124-
moveLiftDownButton.whileHeld(new MoveLift(Robot.lift, false));
122+
// moveLiftUpButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Up", 10));
123+
// moveLiftUpButton.whileHeld(new MoveLift(Robot.lift, true));
124+
// moveLiftDownButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Down", 11));
125+
// moveLiftDownButton.whileHeld(new MoveLift(Robot.lift, false));
125126

126127
manipulator = new Joystick(2);
127128
// if (manipulator.getButtonCount() == 0) {

Robot2018/src/main/java/org/usfirst/frc/team199/Robot2018/commands/FindTurnTimeConstant.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ public FindTurnTimeConstant(Robot robot, DrivetrainInterface dt, AHRS gyro, Smar
5353
// Called just before this Command runs the first time
5454
protected void initialize() {
5555
System.out.println("FindTurnTimeConstant is in init()");
56-
// if (!robot.isTest()) {
57-
// System.out.println("but you're not in test mode.");
58-
// return;
59-
// }
56+
if (!robot.isTest()) {
57+
System.out.println("but you're not in test mode.");
58+
return;
59+
}
6060

6161
// this should be done in low gear
6262
Robot.dt.shiftGears(false);

Robot2018/src/main/java/org/usfirst/frc/team199/Robot2018/commands/UpdateLiftPosition.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected void execute() {
4141
// if (manipulatorPluggedIn) {
4242
int angle = Robot.oi.manipulator.getPOV();
4343

44-
System.out.println("POV Reading: " + angle);
44+
// System.out.println("POV Reading: " + angle);
4545

4646
if (angle == 180) {
4747
desiredPos = LiftHeight.HOLD_CUBE;
@@ -65,9 +65,9 @@ protected void execute() {
6565
lift.setSetpoint(desiredDist);
6666
goToGround = false;
6767
}
68-
System.out.println("Desired Pos: " + desiredPos);
69-
System.out.println("Desired Dist: " + desiredDist);
70-
System.out.println("Current Dist: " + lift.getHeight());
68+
// System.out.println("Desired Pos: " + desiredPos);
69+
// System.out.println("Desired Dist: " + desiredDist);
70+
// System.out.println("Current Dist: " + lift.getHeight());
7171
}
7272

7373
// Make this return true when this Command no longer needs to run execute()

Robot2018/src/main/java/org/usfirst/frc/team199/Robot2018/subsystems/Drivetrain.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ public void teleopDrive() {
236236
if (Robot.getBool("Arcade Drive Default Setup", true)) {
237237
forw = -Robot.oi.leftJoy.getY();
238238
turn = Robot.oi.rightJoy.getX();
239+
System.out.println("Forward is " + forw + " and turn is " + turn);
239240
Robot.dt.arcadeDrive(squareJoy ? Robot.oi.squareValueKeepSign(forw) : forw,
240241
squareJoy ? Robot.oi.squareValueKeepSign(turn) : turn);
241242
} else {

0 commit comments

Comments
 (0)