Strange Error Message

Hi all,

i was woking on my code last night when I encounted the following error. I was hoping for some help on it because I cant seem to make sense of it. My buttons are all not set to values less than 1 (as seen in the constants folder), yet the error message when I run a simulation remains. I was hoping for any potential ideas for why this happens. Thanks

Code:

Error Message:

Error at edu.wpi.first.wpilibj.DriverStation.reportJoystickUnpluggedError(DriverStation.java:1476): Button indexes begin at 1 in WPILib for C++ and Java```

In your constants class, all of your button constants are set to 0. Everything else looks good, but those need to be different values and not 0.

Normally in the driver station, the a button is 1, b is 2, x is 3, and y is 4.

Updated the variables, now i have this warning. Any ideas?

(git updated btw)

 Warning at edu.wpi.first.wpilibj.DriverStation.reportJoystickUnpluggedWarning(DriverStation.java:1489): Joystick axis 3 on port 0 not available, check if controller is

Sometimes the triggers aren’t actually axis but instead buttons. Could you provide the type of joystick you are using?

If you look at your driver station interface in the usb devices tab, when you press and depress the triggers are they both recognized and moving axis values or button boxes?

both our right and left triggers are recognized as axis. I’m unsure of how this input is read by the Code though. I’m assuming the trigger reads an input from 0 to 1 because a negative input wouldn’t make sense to me.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.