Quote:
Originally Posted by James Lightfoot
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).