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

Commit 3c2b3ad

Browse files
authored
Merge pull request #96 from lhmcgann/driver-joystick-pref-changes
Driver joystick pref changes
2 parents 97d96f8 + 42b5d06 commit 3c2b3ad

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,33 +76,36 @@ public OI(Robot robot) {
7676
leftJoy = new Joystick(0);
7777
shiftDriveTypeButton = new JoystickButton(leftJoy, getButton("Shift Drive Type", 2));
7878
shiftDriveTypeButton.whenPressed(new ShiftDriveType());
79+
7980
pIDMoveButton = new JoystickButton(leftJoy, getButton("PID Move", 7));
8081
pIDMoveButton
8182
.whenPressed(new PIDMove(Robot.sd.getConst("Move Targ", 24), Robot.dt, Robot.sd, RobotMap.distEncAvg));
8283
pIDTurnButton = new JoystickButton(leftJoy, getButton("PID Turn", 8));
83-
// PIDTurnButton.whenPressed(new PIDTurn(Robot.getConst("Turn Targ", 90),
84-
// Robot.dt, Robot.sd RobotMap.fancyGyro));
8584
pIDTurnButton
8685
.whenReleased(new PIDTurn(Robot.getConst("Turn Targ", 90), Robot.dt, Robot.sd, RobotMap.fancyGyro));
86+
8787
resetEncButton = new JoystickButton(leftJoy, getButton("Reset Dist Enc", 10));
8888
resetEncButton.whenPressed(new ResetEncoders());
89+
8990
findTurnTimeConstantButton = new JoystickButton(leftJoy, getButton("Find Turn Time Constant", 11));
9091
// the command will only run in test mode
9192
findTurnTimeConstantButton
9293
.whenPressed(new FindTurnTimeConstant(robot, Robot.dt, Robot.rmap.fancyGyro, Robot.sd));
9394

9495
rightJoy = new Joystick(1);
95-
shiftHighGearButton = new JoystickButton(rightJoy, getButton("Shift High Gear", 3));
96+
shiftHighGearButton = new JoystickButton(rightJoy, getButton("Shift High Gear", 4));
9697
shiftHighGearButton.whenPressed(new ShiftHighGear());
97-
shiftLowGearButton = new JoystickButton(rightJoy, getButton("Shift Low Gear", 2));
98+
shiftLowGearButton = new JoystickButton(rightJoy, getButton("Shift Low Gear", 3));
9899
shiftLowGearButton.whenPressed(new ShiftLowGear());
100+
99101
updatePIDConstantsButton = new JoystickButton(rightJoy, getButton("Get PID Constants", 8));
100102
updatePIDConstantsButton.whenPressed(new UpdatePIDConstants());
101103
updateEncoderDPPButton = new JoystickButton(rightJoy, getButton("Get Encoder Dist Per Pulse", 9));
102104
updateEncoderDPPButton.whenPressed(new SetDistancePerPulse());
105+
103106
moveLiftUpButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Up", 10));
104-
moveLiftDownButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Down", 11));
105107
moveLiftUpButton.whileHeld(new RunLift(Robot.lift, true));
108+
moveLiftDownButton = new JoystickButton(rightJoy, getButton("Run Lift Motor Down", 11));
106109
moveLiftDownButton.whileHeld(new RunLift(Robot.lift, false));
107110

108111
manipulator = new Joystick(2);

docs/controllers.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
8 turn with PID by degrees from SmartDashboard "Turn Targ" [PIDTurn]
1111
9
1212
10 reset left and right drivetrain encoders to 0 [ResetEncoders]
13-
11 run experiment to find turning time constant (FindTurnTimeConstant)
13+
11 run experiment to find turning time constant [FindTurnTimeConstant]
1414
axes
1515
0 X axis if NOT default: arcade turn
1616
1 Y axis tank left, arcade forward (if default)
1717
2 Z axis
1818
1 right joystick
1919
buttons
2020
1 slow turning movement in arcade, or all movement in tank
21-
2 shift drivetrain to low gear [ShiftLowGear]
22-
3 shift drivetrain to high gear [ShiftHighGear]
23-
4
21+
2
22+
3 shift drivetrain to low gear [ShiftLowGear]
23+
4 shift drivetrain to high gear [ShiftHighGear]
2424
5
2525
6
2626
7

0 commit comments

Comments
 (0)