View Single Post
  #6   Spotlight this post!  
Unread 28-02-2014, 09:12
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 947
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: XBOX Controller JAVA Programming

Quote:
Originally Posted by James Lightfoot View Post
OK. In trying to "clean up" the parts we are not using (e.g. some of the buttons, the right stick's x-axis), I think I got it where I want it, except for 1 thing. The intial class declaration "public class XboxController extends GenericHID implements IInputOutput" is returning "XboxControlleris not abstract and does not override abstract method GetRawButton (int)in GenericHID” error. As I am crashing into Java, I'm not swift enough to realize what I need to do later in the class when I am pulling button true/false states.

*snip*

Any help will be greatly appreciated.
You're running into issues because you're extending the class GenericHID. If you do that, you'll have to implement your own version of every method on this page listed as abstract.

My suggestion would be to extend Joystick instead, as all that will be done for you (The XBox controller functions as a Joystick anyway), then you can implement your own methods for detecting specific buttons.
Reply With Quote