[commands] Add missing PS4 triangle methods (#4576)

This commit is contained in:
Starlight220
2022-11-07 20:15:54 +02:00
committed by GitHub
parent 5be5869b2f
commit d426873ed1
2 changed files with 32 additions and 0 deletions

View File

@@ -494,6 +494,17 @@ public class PS4Controller extends GenericHID {
return getRawButtonReleased(Button.kTriangle.value);
}
/**
* Constructs an event instance around the triangle button's digital signal.
*
* @param loop the event loop instance to attach the event to.
* @return an event instance representing the triangle button's digital signal attached to the
* given loop.
*/
public BooleanEvent triangle(EventLoop loop) {
return new BooleanEvent(loop, this::getTriangleButton);
}
/**
* Read the value of the Circle button on the controller.
*