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

Commit e55f737

Browse files
committed
made buttons private as per request by dean and fixed getButton
1 parent fee15e9 commit e55f737

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Robot2018/.classpath

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
<classpathentry kind="var" path="wpiutil" sourcepath="wpiutil.sources"/>
1010
<classpathentry kind="lib" path="/Robot2017/libs/jars/navx_frc.jar"/>
1111
<classpathentry kind="var" path="USERLIBS_DIR/CTRE_Phoenix.jar"/>
12+
<classpathentry kind="var" path="USERLIBS_DIR/CTRE_Phoenix-sources.jar"/>
13+
<classpathentry kind="var" path="USERLIBS_DIR/navx_frc.jar"/>
1214
<classpathentry kind="output" path="bin"/>
1315
</classpath>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ public class OI {
4848
// button.whenReleased(new ExampleCommand());
4949

5050
public Joystick leftJoy;
51-
public JoystickButton shiftDrive;
52-
public JoystickButton shiftDriveType;
51+
private JoystickButton shiftDrive;
52+
private JoystickButton shiftDriveType;
5353
public Joystick rightJoy;
5454
public Joystick manipulator;
5555

5656
public int getButton(String key, int def) {
57-
if (!SmartDashboard.containsKey(key)) {
57+
if (!SmartDashboard.containsKey("Button/" + key)) {
5858
SmartDashboard.putNumber("Button/" + key, def);
5959
}
6060
return (int) SmartDashboard.getNumber("Button/" + key, def);

0 commit comments

Comments
 (0)