Class PS4Controller

java.lang.Object
edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.PS4Controller

public class PS4Controller
extends GenericHID
Handle input from PS4 controllers connected to the Driver Station.

This class handles PS4 input that comes from the Driver Station. Each time a value is requested the most recent value is returned. There is a single class instance for each controller and the mapping of ports to hardware buttons depends on the code in the Driver Station.

  • Constructor Details

    • PS4Controller

      public PS4Controller​(int port)
      Construct an instance of a device.
      Parameters:
      port - The port index on the Driver Station that the device is plugged into.
  • Method Details