View Single Post
  #4   Spotlight this post!  
Unread 24-02-2015, 07:00
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Robot drives forward with no joystick connected

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
Reply With Quote