001/*----------------------------------------------------------------------------*/
002/* Copyright (c) FIRST 2016-2017. All Rights Reserved.                        */
003/* Open Source Software - may be modified and shared by FRC teams. The code   */
004/* must be accompanied by the FIRST BSD license file in the root directory of */
005/* the project.                                                               */
006/*----------------------------------------------------------------------------*/
007
008package edu.wpi.first.wpilibj;
009
010/**
011 * Gamepad Interface.
012 */
013public abstract class GamepadBase extends GenericHID {
014  public GamepadBase(int port) {
015    super(port);
016  }
017
018  public abstract double getRawAxis(int axis);
019
020  /**
021   * Is the bumper pressed.
022   *
023   * @param hand which hand
024   * @return true if the bumper is pressed
025   */
026  public abstract boolean getBumper(Hand hand);
027
028  /**
029   * Is the bumper pressed.
030   *
031   * @return true if the bumper is pressed
032   */
033  public boolean getBumper() {
034    return getBumper(Hand.kRight);
035  }
036
037  public abstract boolean getStickButton(Hand hand);
038
039  public boolean getStickButton() {
040    return getStickButton(Hand.kRight);
041  }
042
043  public abstract boolean getRawButton(int button);
044
045  public abstract int getPOV(int pov);
046
047  public abstract int getPOVCount();
048
049  public abstract HIDType getType();
050
051  public abstract String getName();
052
053  public abstract void setOutput(int outputNumber, boolean value);
054
055  public abstract void setOutputs(int value);
056
057  public abstract void setRumble(RumbleType type, double value);
058}