View Single Post
  #8   Spotlight this post!  
Unread 28-02-2014, 11:48
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
Thanks for the replies. So if I change the code to this:

*snip*

The original error goes away, but a new one pops up under the constructor for the XboxController's super();:
no suitable constructor found for Joystick(no arguments) constructor Joystick.Joystick(int) is not applicable (actual and format argument lists differ in length
constructor Joystick.Joystick(int, int, int) is not applicable

I'm thinking that my lack of knowledge of the FRC's Java library is what is killing us, in addition to not being super familiar w/ Java. My programming comes from a much different place (PLC's/PAC's, HMI's, SCAD, DCS) which often calls for platfor specific scripting.

Thanks again,
So, in Java, what super() does is if you're extending a class, it calls the constructor of the class you're extending (or superclass). So, right now, it's trying to call Joystick(). If we look at the javadoc for Joystick, we can see the valid constructors for Joystick. You probably want to sue the 1-argument one, and change it to super(port).
Reply With Quote