Skip to content

Commit 8dd01b8

Browse files
committed
include ps4 file i forgot to push
1 parent 407ef6d commit 8dd01b8

File tree

1 file changed

+6
-5
lines changed
  • src/main/java/com/stuypulse/stuylib/input/gamepads

1 file changed

+6
-5
lines changed

src/main/java/com/stuypulse/stuylib/input/gamepads/PS4.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import com.stuypulse.stuylib.input.WPIGamepad;
88

9+
import edu.wpi.first.wpilibj.DriverStation;
910
import edu.wpi.first.wpilibj.Joystick;
1011

1112
/**
@@ -53,24 +54,24 @@ public double getRightY() {
5354
}
5455

5556
// D-Pad //
56-
@Override
57+
@Override
5758
public boolean getRawDPadUp() {
58-
return getJoystick().getPOV() == 0;
59+
return getJoystick().getPOV().equals(DriverStation.POVDirection.Up);
5960
}
6061

6162
@Override
6263
public boolean getRawDPadDown() {
63-
return getJoystick().getPOV() == 180;
64+
return getJoystick().getPOV().equals(DriverStation.POVDirection.Down);
6465
}
6566

6667
@Override
6768
public boolean getRawDPadLeft() {
68-
return getJoystick().getPOV() == 270;
69+
return getJoystick().getPOV().equals(DriverStation.POVDirection.Left);
6970
}
7071

7172
@Override
7273
public boolean getRawDPadRight() {
73-
return getJoystick().getPOV() == 90;
74+
return getJoystick().getPOV().equals(DriverStation.POVDirection.Right);
7475
}
7576

7677
// Bumpers //

0 commit comments

Comments
 (0)