Skip to content

Commit

Permalink
Fix PS5 Controller mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse committed Dec 15, 2023
1 parent 7c8b7a9 commit 9e1de46
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions wpilibc/src/main/native/include/frc/PS5Controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,29 +500,29 @@ class PS5Controller : public GenericHID {
BooleanEvent Touchpad(EventLoop* loop) const;

struct Button {
static constexpr int kSquare = 3;
static constexpr int kCross = 1;
static constexpr int kCircle = 2;
static constexpr int kSquare = 1;
static constexpr int kCross = 2;
static constexpr int kCircle = 3;
static constexpr int kTriangle = 4;
static constexpr int kL1 = 5;
static constexpr int kR1 = 6;
static constexpr int kL2 = 7;
static constexpr int kR2 = 8;
static constexpr int kCreate = 9;
static constexpr int kOptions = 10;
static constexpr int kL3 = 12;
static constexpr int kR3 = 13;
static constexpr int kPS = 11;
static constexpr int kL3 = 11;
static constexpr int kR3 = 12;
static constexpr int kPS = 13;
static constexpr int kTouchpad = 14;
};

struct Axis {
static constexpr int kLeftX = 0;
static constexpr int kLeftY = 1;
static constexpr int kRightX = 3;
static constexpr int kRightY = 4;
static constexpr int kL2 = 2;
static constexpr int kR2 = 5;
static constexpr int kRightX = 2;
static constexpr int kRightY = 5;
static constexpr int kL2 = 3;
static constexpr int kR2 = 4;
};
};

Expand Down
20 changes: 10 additions & 10 deletions wpilibj/src/main/java/edu/wpi/first/wpilibj/PS5Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ public PS5Controller(int port) {

/** Represents a digital button on a PS5Controller. */
public enum Button {
kCross(1),
kCircle(2),
kSquare(3),
kSquare(1),
kCross(2),
kCircle(3),
kTriangle(4),
kL1(5),
kR1(6),
kL2(7),
kR2(8),
kCreate(9),
kOptions(10),
kPS(11),
kL3(12),
kR3(13),
kL3(11),
kR3(12),
kPS(13),
kTouchpad(14);

public final int value;
Expand Down Expand Up @@ -70,10 +70,10 @@ public String toString() {
public enum Axis {
kLeftX(0),
kLeftY(1),
kL2(2),
kRightX(3),
kRightY(4),
kR2(5);
kL2(3),
kRightX(2),
kRightY(5),
kR2(4);

public final int value;

Expand Down

0 comments on commit 9e1de46

Please sign in to comment.