projects
/
3501
/
3501-spark-go
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make so does not crash
[3501/3501-spark-go]
/
src
/
org
/
usfirst
/
frc
/
team3501
/
robot
/
Joystick.java
diff --git
a/src/org/usfirst/frc/team3501/robot/Joystick.java
b/src/org/usfirst/frc/team3501/robot/Joystick.java
index fab679234f9c1486cd4a427da34aab418a786bd2..7eac768cb0554bce4dcafdb9386bd2794898b7c6 100644
(file)
--- a/
src/org/usfirst/frc/team3501/robot/Joystick.java
+++ b/
src/org/usfirst/frc/team3501/robot/Joystick.java
@@
-13,7
+13,9
@@
public class Joystick extends edu.wpi.first.wpilibj.Joystick {
public Joystick(int port) {
super(port);
public Joystick(int port) {
super(port);
- IntStream.rangeClosed(1, 12).forEach((b) -> {
+ buttons = new HashMap<Integer, JoystickButton>();
+
+ IntStream.rangeClosed(1, getButtonCount()).forEach((b) -> {
buttons.put(b, new JoystickButton(this, b));
});
}
buttons.put(b, new JoystickButton(this, b));
});
}