[wpilib,cmd] Rename gamepad face-button trigger APIs to directional names (faceUp/Down/Left/Right) (#8896)

This updates gamepad trigger naming from cardinal-style face buttons
(`northFace/southFace/eastFace/westFace` and
`NorthFace/SouthFace/EastFace/WestFace`) to directional naming
(`faceUp/faceDown/faceRight/faceLeft` and
`FaceUp/FaceDown/FaceRight/FaceLeft`) to match the requested API shape.
The change is applied across Java and C++ HID/command layers, along with
related examples and binding metadata.

- **API surface updates (Java)**
  - Renamed trigger/event methods in:
    - `wpilibj` `Gamepad`
    - `commandsv2` `CommandGamepad`
    - `commandsv3` `CommandGamepad`
  - Mapping preserved:
    - `southFace` → `faceDown`
    - `eastFace` → `faceRight`
    - `westFace` → `faceLeft`
    - `northFace` → `faceUp`

- **API surface updates (C++)**
  - Renamed trigger/event methods in:
    - `wpilibc` `Gamepad`
    - `commandsv2` `CommandGamepad`
  - Mapping preserved:
    - `SouthFace` → `FaceDown`
    - `EastFace` → `FaceRight`
    - `WestFace` → `FaceLeft`
    - `NorthFace` → `FaceUp`

- **Python semiwrap updates**
- Updated `wpilibc/src/main/python/semiwrap/Gamepad.yml` method mappings
to the renamed C++ method names (`FaceDown/FaceRight/FaceLeft/FaceUp`).

- **Callsite migration**
- Updated Java examples/template code and C++ examples/template code to
use the new method names so samples remain aligned with the API rename.

- **Docs/comments alignment**
- Updated related Javadoc/reference text and example comments to use
directional terminology.

```java
// Before
driverController.southFace().onTrue(command);
driverController.eastFace().onTrue(command);

// After
driverController.faceDown().onTrue(command);
driverController.faceRight().onTrue(command);
```

```cpp
// Before
driverController.SouthFace().OnTrue(command);
driverController.EastFace().OnTrue(command);

// After
driverController.FaceDown().OnTrue(command);
driverController.FaceRight().OnTrue(command);
```

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ThadHouse <7727148+ThadHouse@users.noreply.github.com>
This commit is contained in:
Thad House
2026-05-14 22:08:57 -07:00
committed by GitHub
parent 67b795057b
commit fa24446ce3
20 changed files with 173 additions and 173 deletions

View File

@@ -223,14 +223,14 @@ class Gamepad : public GenericHID,
bool GetSouthFaceButtonReleased();
/**
* Constructs an event instance around the South Face button's
* Constructs an event instance around the Face Down button's
* digital signal.
*
* @param loop the event loop instance to attach the event to.
* @return an event instance representing the South Face button's
* @return an event instance representing the Face Down button's
* digital signal attached to the given loop.
*/
BooleanEvent SouthFace(EventLoop* loop) const;
BooleanEvent FaceDown(EventLoop* loop) const;
/**
* Read the value of the East Face button on the controller.
@@ -254,14 +254,14 @@ class Gamepad : public GenericHID,
bool GetEastFaceButtonReleased();
/**
* Constructs an event instance around the East Face button's
* Constructs an event instance around the Face Right button's
* digital signal.
*
* @param loop the event loop instance to attach the event to.
* @return an event instance representing the East Face button's
* @return an event instance representing the Face Right button's
* digital signal attached to the given loop.
*/
BooleanEvent EastFace(EventLoop* loop) const;
BooleanEvent FaceRight(EventLoop* loop) const;
/**
* Read the value of the West Face button on the controller.
@@ -285,14 +285,14 @@ class Gamepad : public GenericHID,
bool GetWestFaceButtonReleased();
/**
* Constructs an event instance around the West Face button's
* Constructs an event instance around the Face Left button's
* digital signal.
*
* @param loop the event loop instance to attach the event to.
* @return an event instance representing the West Face button's
* @return an event instance representing the Face Left button's
* digital signal attached to the given loop.
*/
BooleanEvent WestFace(EventLoop* loop) const;
BooleanEvent FaceLeft(EventLoop* loop) const;
/**
* Read the value of the North Face button on the controller.
@@ -316,14 +316,14 @@ class Gamepad : public GenericHID,
bool GetNorthFaceButtonReleased();
/**
* Constructs an event instance around the North Face button's
* Constructs an event instance around the Face Up button's
* digital signal.
*
* @param loop the event loop instance to attach the event to.
* @return an event instance representing the North Face button's
* @return an event instance representing the Face Up button's
* digital signal attached to the given loop.
*/
BooleanEvent NorthFace(EventLoop* loop) const;
BooleanEvent FaceUp(EventLoop* loop) const;
/**
* Read the value of the Back button on the controller.