![]() |
BoundaryException on Cypress Board
We use a cypress board for our co-driver, and it recently started throwing an exception whenever we try to access a certain switch, however it had worked before. We traced back through our changes and can't seem to find the problem.
It throws Code:
edu.wpi.first.wpilibj.util.BoundaryException: Value must be between 1.0 and 6.0, 7.0 givenCode:
DriverStation.getInstance().getEnhancedIO().getButton(7) |
Re: BoundaryException on Cypress Board
According to the documentation for DriverStationEnhancedIO, the button index given to getButton must be in the range of 1 to 6. You are passing 7 to this function.
Are you sure that you mean to use button seven? |
Re: BoundaryException on Cypress Board
Does this mean that we can only use six buttons? I swear we've used more in previous years.
|
Re: BoundaryException on Cypress Board
Quote:
|
Re: BoundaryException on Cypress Board
Switching to getDigital() does it, thank you. I guess i got mixed up between EnhancedIO and Joystick.
|
| All times are GMT -5. The time now is 10:08. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi