View Single Post
  #2   Spotlight this post!  
Unread 24-02-2015, 07:34
GuyM142's Avatar
GuyM142 GuyM142 is offline
Registered User
AKA: Guy
FRC #3339 (BumbleBee)
Team Role: Mentor
 
Join Date: Jul 2013
Rookie Year: 2012
Location: Israel
Posts: 158
GuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really niceGuyM142 is just really nice
Re: Robot drives forward with no joystick connected

Quote:
Originally Posted by Greg McKaskle View Post
If you request a joystick value, and the joystick isn't plugged in, the VI returns empty arrays. If you then index those empty arrays, LV will return the default value for that array type -- numbers will be zero, Booleans false, etc.

We were sort seeing the same thing earlier in the season with the POVs. The array was empty, but they were indexed anyway. The index returns a zero, which meant up on the elevator.

So, does any of this explain why this was happening? If not, can you post the code or a picture of the code that reads the joysticks and sends values to drive?

Greg McKaskle
That's it!
We use the POV to make the mecanum go straight in any direction.
Is there a solution for this?
Reply With Quote