View Single Post
  #3   Spotlight this post!  
Unread 23-02-2011, 08:16
java4first java4first is offline
(Java) Programming Mentor
AKA: Stu
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 2011
Location: Goffstown, NH
Posts: 56
java4first is an unknown quantity at this point
Re: Dashboard Tutorial fro Java Pls :)

A further note on this, and a question on LabView programming ...

(1) If you use any of the default Dashboard (namely the display of the digitial stuff from the sidecars) - it turns out that the WPI code returns the DIO data in FPGA order, not laptop display order. So you end up displaying 2 bits (14 & 15) that mean nothing, don't display 2 bits (0 & 1) and everything else is in reverse order. Since I'm not a LabView programmer, I put the code in Java on the robot to reverse the bits in this set of calls (after I get the data and before I add it):

lowDashData.addShort(DigitalModule.getInstance(mod ule).getAllDIO());
lowDashData.addShort(DigitalModule.getInstance(mod ule).getDIODirection());

(2) Now my question ... we are using two digitial sidecars this year, and although the code appears to get the data (from module 4 and module 6), the default(?) display only displays module 4. We were able to get all our custom data wired into the display, but haven't been able to figure out yet how to create a copy of the module 4 display and wire it to the second set of data in the cluster / array. Our team has zero experience with LabView (other than what we've managed to do in the last six weeks). I can see the building blocks in the wiring diagram, and more or less understand what it's doing (to convert the cluster to the array, and then extract the data with an index selector). But if someone could point me to an example or give a hint on how to wire / extract the second module, and get it displayed with the same UI stuff in the dashaboard, I'd appreciate it.

Thanks!
Reply With Quote