View Single Post
  #2   Spotlight this post!  
Unread 03-02-2015, 06:52
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: Switch Camera in Labview Dashboard with Joystick

If the camera selector already does what you want, the task isn't hard, but will involve a little code in each language.

In Java, on the robot, read the joystick and update a Smart Dashboard variable that represents the desired camera state.

On the DB, in LV, in the top loop, you will want to read the Smart Dashboard variable by name and update the LabVIEW control using a local variable update. The top loop already has several reads of the joystick and motors. You can drop another by right clicking on the diagram and going to the bottom of the palettes. Drop the SD Read Value, choose the correct type from the selector, and wire up the name of the SD Variable.

In the second loop, where the vision is performed, you can right click on the blue Vision terminal and choose to Create >> Local Variable. Drop it into the top loop downstream of the SD Read. Wire the output of the read to the local variable. Add any mapping math to either the Java or Dashboard.

Greg McKaskle
Reply With Quote