Class Switch2ProControllerSim
java.lang.Object
org.wpilib.simulation.GenericHIDSim
org.wpilib.simulation.Switch2ProControllerSim
Class to control a simulated Switch2Pro controller.
-
Field Summary
Fields inherited from class GenericHIDSim
m_port -
Constructor Summary
ConstructorsConstructorDescriptionSwitch2ProControllerSim(int port) Constructs from a joystick port number.Switch2ProControllerSim(Switch2ProController joystick) Constructs from a Switch2ProController object. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAButton(boolean value) Change the value of the A button on the controller.voidsetBButton(boolean value) Change the value of the B button on the controller.voidsetCaptureButton(boolean value) Change the value of the Capture button on the controller.voidsetCButton(boolean value) Change the value of the C button on the controller.voidsetDpadDownButton(boolean value) Change the value of the Dpad Down button on the controller.voidsetDpadLeftButton(boolean value) Change the value of the Dpad Left button on the controller.voidsetDpadRightButton(boolean value) Change the value of the Dpad Right button on the controller.voidsetDpadUpButton(boolean value) Change the value of the Dpad Up button on the controller.voidsetGLButton(boolean value) Change the value of the GL button on the controller.voidsetGRButton(boolean value) Change the value of the GR button on the controller.voidsetHomeButton(boolean value) Change the value of the Home button on the controller.voidsetLButton(boolean value) Change the value of the L button on the controller.voidsetLeftStickButton(boolean value) Change the value of the Left Stick button on the controller.voidsetLeftX(double value) Change the Left X value of the controller.voidsetLeftY(double value) Change the Left Y value of the controller.voidsetMinusButton(boolean value) Change the value of the Minus button on the controller.voidsetPlusButton(boolean value) Change the value of the Plus button on the controller.voidsetRButton(boolean value) Change the value of the R button on the controller.voidsetRightStickButton(boolean value) Change the value of the Right Stick button on the controller.voidsetRightX(double value) Change the Right X value of the controller.voidsetRightY(double value) Change the Right Y value of the controller.voidsetXButton(boolean value) Change the value of the X button on the controller.voidsetYButton(boolean value) Change the value of the Y button on the controller.voidsetZL(double value) Change the ZL value of the controller.voidsetZR(double value) Change the ZR value of the controller.Methods inherited from class GenericHIDSim
getLeds, getRumble, notifyNewData, setAxesAvailable, setAxesMaximumIndex, setButtonsAvailable, setButtonsMaximumIndex, setGamepadType, setName, setPOV, setPOV, setPOVsAvailable, setPOVsMaximumIndex, setRawAxis, setRawButton, setSupportedOutputs
-
Constructor Details
-
Switch2ProControllerSim
Constructs from a Switch2ProController object.- Parameters:
joystick- controller to simulate
-
Switch2ProControllerSim
public Switch2ProControllerSim(int port) Constructs from a joystick port number.- Parameters:
port- port number
-
-
Method Details
-
setLeftX
public void setLeftX(double value) Change the Left X value of the controller.- Parameters:
value- the new value
-
setLeftY
public void setLeftY(double value) Change the Left Y value of the controller.- Parameters:
value- the new value
-
setRightX
public void setRightX(double value) Change the Right X value of the controller.- Parameters:
value- the new value
-
setRightY
public void setRightY(double value) Change the Right Y value of the controller.- Parameters:
value- the new value
-
setZL
public void setZL(double value) Change the ZL value of the controller.- Parameters:
value- the new value
-
setZR
public void setZR(double value) Change the ZR value of the controller.- Parameters:
value- the new value
-
setBButton
public void setBButton(boolean value) Change the value of the B button on the controller.- Parameters:
value- the new value
-
setAButton
public void setAButton(boolean value) Change the value of the A button on the controller.- Parameters:
value- the new value
-
setYButton
public void setYButton(boolean value) Change the value of the Y button on the controller.- Parameters:
value- the new value
-
setXButton
public void setXButton(boolean value) Change the value of the X button on the controller.- Parameters:
value- the new value
-
setMinusButton
public void setMinusButton(boolean value) Change the value of the Minus button on the controller.- Parameters:
value- the new value
-
setHomeButton
public void setHomeButton(boolean value) Change the value of the Home button on the controller.- Parameters:
value- the new value
-
setPlusButton
public void setPlusButton(boolean value) Change the value of the Plus button on the controller.- Parameters:
value- the new value
-
setLeftStickButton
public void setLeftStickButton(boolean value) Change the value of the Left Stick button on the controller.- Parameters:
value- the new value
-
setRightStickButton
public void setRightStickButton(boolean value) Change the value of the Right Stick button on the controller.- Parameters:
value- the new value
-
setLButton
public void setLButton(boolean value) Change the value of the L button on the controller.- Parameters:
value- the new value
-
setRButton
public void setRButton(boolean value) Change the value of the R button on the controller.- Parameters:
value- the new value
-
setDpadUpButton
public void setDpadUpButton(boolean value) Change the value of the Dpad Up button on the controller.- Parameters:
value- the new value
-
setDpadDownButton
public void setDpadDownButton(boolean value) Change the value of the Dpad Down button on the controller.- Parameters:
value- the new value
-
setDpadLeftButton
public void setDpadLeftButton(boolean value) Change the value of the Dpad Left button on the controller.- Parameters:
value- the new value
-
setDpadRightButton
public void setDpadRightButton(boolean value) Change the value of the Dpad Right button on the controller.- Parameters:
value- the new value
-
setCaptureButton
public void setCaptureButton(boolean value) Change the value of the Capture button on the controller.- Parameters:
value- the new value
-
setGRButton
public void setGRButton(boolean value) Change the value of the GR button on the controller.- Parameters:
value- the new value
-
setGLButton
public void setGLButton(boolean value) Change the value of the GL button on the controller.- Parameters:
value- the new value
-
setCButton
public void setCButton(boolean value) Change the value of the C button on the controller.- Parameters:
value- the new value
-