File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
src/main/java/com/stuypulse/stuylib/input/gamepads Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 11plugins {
22 id " java"
3- id " edu.wpi.first.GradleRIO2027" version " 2027.0.0-alpha-1 "
3+ id " edu.wpi.first.GradleRIO2027" version " 2027.0.0-alpha-2 "
44 id " maven-publish"
55}
66
Original file line number Diff line number Diff line change 66
77import com .stuypulse .stuylib .input .WPIGamepad ;
88
9+ import edu .wpi .first .wpilibj .DriverStation ;
910import edu .wpi .first .wpilibj .Joystick ;
1011import edu .wpi .first .wpilibj .XboxController ;
1112
@@ -28,22 +29,22 @@ protected Logitech(Joystick joystick) {
2829 // D-Pad //
2930 @ Override
3031 public boolean getRawDPadUp () {
31- return getJoystick ().getPOV () == 0 ;
32+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Up ) ;
3233 }
3334
3435 @ Override
3536 public boolean getRawDPadDown () {
36- return getJoystick ().getPOV () == 180 ;
37+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Down ) ;
3738 }
3839
3940 @ Override
4041 public boolean getRawDPadLeft () {
41- return getJoystick ().getPOV () == 270 ;
42+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Left ) ;
4243 }
4344
4445 @ Override
4546 public boolean getRawDPadRight () {
46- return getJoystick ().getPOV () == 90 ;
47+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Right ) ;
4748 }
4849
4950 /**
Original file line number Diff line number Diff line change 66
77import com .stuypulse .stuylib .input .Gamepad ;
88
9+ import edu .wpi .first .wpilibj .DriverStation ;
910import edu .wpi .first .wpilibj .GenericHID .RumbleType ;
1011import edu .wpi .first .wpilibj .XboxController ;
1112
@@ -71,22 +72,22 @@ public double getRightY() {
7172 // D-Pad //
7273 @ Override
7374 public boolean getRawDPadUp () {
74- return getJoystick ().getPOV () == 0 ;
75+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Up ) ;
7576 }
7677
7778 @ Override
7879 public boolean getRawDPadDown () {
79- return getJoystick ().getPOV () == 180 ;
80+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Down ) ;
8081 }
8182
8283 @ Override
8384 public boolean getRawDPadLeft () {
84- return getJoystick ().getPOV () == 270 ;
85+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Left ) ;
8586 }
8687
8788 @ Override
8889 public boolean getRawDPadRight () {
89- return getJoystick ().getPOV () == 90 ;
90+ return getJoystick ().getPOV (). equals ( DriverStation . POVDirection . Right ) ;
9091 }
9192
9293 // Bumpers //
You can’t perform that action at this time.
0 commit comments