001/*----------------------------------------------------------------------------*/ 002/* Copyright (c) 2016-2018 FIRST. 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 * 013 * @deprecated Inherit directly from GenericHID instead. 014 */ 015@Deprecated 016public abstract class GamepadBase extends GenericHID { 017 public GamepadBase(int port) { 018 super(port); 019 } 020 021 public abstract double getRawAxis(int axis); 022 023 /** 024 * Is the bumper pressed. 025 * 026 * @param hand which hand 027 * @return true if the bumper is pressed 028 */ 029 public abstract boolean getBumper(Hand hand); 030 031 /** 032 * Is the bumper pressed. 033 * 034 * @return true if the bumper is pressed 035 */ 036 public boolean getBumper() { 037 return getBumper(Hand.kRight); 038 } 039 040 public abstract boolean getStickButton(Hand hand); 041 042 public boolean getStickButton() { 043 return getStickButton(Hand.kRight); 044 } 045 046 public abstract boolean getRawButton(int button); 047 048 public abstract int getPOV(int pov); 049 050 public abstract int getPOVCount(); 051 052 public abstract HIDType getType(); 053 054 public abstract String getName(); 055 056 public abstract void setOutput(int outputNumber, boolean value); 057 058 public abstract void setOutputs(int value); 059 060 public abstract void setRumble(RumbleType type, double value); 061}