// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.

// THIS FILE WAS AUTO-GENERATED BY ./wpilibj/generate_hids.py. DO NOT MODIFY

package org.wpilib.simulation;

import org.wpilib.driverstation.NiDsPS5Controller;

/** Class to control a simulated NiDsPS5 controller. */
public class NiDsPS5ControllerSim extends GenericHIDSim {
  /**
   * Constructs from a NiDsPS5Controller object.
   *
   * @param joystick controller to simulate
   */
  @SuppressWarnings("this-escape")
  public NiDsPS5ControllerSim(NiDsPS5Controller joystick) {
    super(joystick);
    setAxesMaximumIndex(6);
    setButtonsMaximumIndex(14);
    setPOVsMaximumIndex(1);
  }

  /**
   * Constructs from a joystick port number.
   *
   * @param port port number
   */
  @SuppressWarnings("this-escape")
  public NiDsPS5ControllerSim(int port) {
    super(port);
    setAxesMaximumIndex(6);
    setButtonsMaximumIndex(14);
    setPOVsMaximumIndex(1);
  }

  /**
   * Change the left X value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setLeftX(double value) {
    setRawAxis(NiDsPS5Controller.Axis.kLeftX.value, value);
  }

  /**
   * Change the left Y value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setLeftY(double value) {
    setRawAxis(NiDsPS5Controller.Axis.kLeftY.value, value);
  }

  /**
   * Change the right X value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setRightX(double value) {
    setRawAxis(NiDsPS5Controller.Axis.kRightX.value, value);
  }

  /**
   * Change the right Y value of the controller's joystick.
   *
   * @param value the new value
   */
  public void setRightY(double value) {
    setRawAxis(NiDsPS5Controller.Axis.kRightY.value, value);
  }

  /**
   * Change the value of the left trigger 2 axis on the controller.
   *
   * @param value the new value
   */
  public void setL2Axis(double value) {
    setRawAxis(NiDsPS5Controller.Axis.kL2.value, value);
  }

  /**
   * Change the value of the right trigger 2 axis on the controller.
   *
   * @param value the new value
   */
  public void setR2Axis(double value) {
    setRawAxis(NiDsPS5Controller.Axis.kR2.value, value);
  }

  /**
   * Change the value of the square button on the controller.
   *
   * @param value the new value
   */
  public void setSquareButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kSquare.value, value);
  }

  /**
   * Change the value of the cross button on the controller.
   *
   * @param value the new value
   */
  public void setCrossButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kCross.value, value);
  }

  /**
   * Change the value of the circle button on the controller.
   *
   * @param value the new value
   */
  public void setCircleButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kCircle.value, value);
  }

  /**
   * Change the value of the triangle button on the controller.
   *
   * @param value the new value
   */
  public void setTriangleButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kTriangle.value, value);
  }

  /**
   * Change the value of the left trigger 1 button on the controller.
   *
   * @param value the new value
   */
  public void setL1Button(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kL1.value, value);
  }

  /**
   * Change the value of the right trigger 1 button on the controller.
   *
   * @param value the new value
   */
  public void setR1Button(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kR1.value, value);
  }

  /**
   * Change the value of the left trigger 2 button on the controller.
   *
   * @param value the new value
   */
  public void setL2Button(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kL2.value, value);
  }

  /**
   * Change the value of the right trigger 2 button on the controller.
   *
   * @param value the new value
   */
  public void setR2Button(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kR2.value, value);
  }

  /**
   * Change the value of the create button on the controller.
   *
   * @param value the new value
   */
  public void setCreateButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kCreate.value, value);
  }

  /**
   * Change the value of the options button on the controller.
   *
   * @param value the new value
   */
  public void setOptionsButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kOptions.value, value);
  }

  /**
   * Change the value of the L3 (left stick) button on the controller.
   *
   * @param value the new value
   */
  public void setL3Button(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kL3.value, value);
  }

  /**
   * Change the value of the R3 (right stick) button on the controller.
   *
   * @param value the new value
   */
  public void setR3Button(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kR3.value, value);
  }

  /**
   * Change the value of the PlayStation button on the controller.
   *
   * @param value the new value
   */
  public void setPSButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kPS.value, value);
  }

  /**
   * Change the value of the touchpad button on the controller.
   *
   * @param value the new value
   */
  public void setTouchpadButton(boolean value) {
    setRawButton(NiDsPS5Controller.Button.kTouchpad.value, value);
  }
}
