|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dashboard Help C++ Windriver
In windriver 2010 image demo, It seems that clusters are created using dash.AddCluster();. Yet in labview, in the image box, the output cluster is divided into 3 parts using the operation unbundle by name. Going back to the windriver code (shown beneath) There is no name assigned to each cluster. There is only a comment on the side, which the compiler can't see.
How does Unbundle by name work if the data doesn't have an assigned name? -Thanks void DashboardDataSender::sendVisionData(double joyStickX, double gyroAngle, double gyroRate, double targetX, vector<Target> targets) { if (visionTimer->Get() < 0.1) return; visionTimer->Reset(); Dashboard &dash = DriverStation::GetInstance()->GetHighPriorityDashboardPacker(); dash.AddCluster(); // wire (2 elements) { dash.AddCluster(); // tracking data { dash.AddDouble(joyStickX); // Joystick X dash.AddDouble(((((int)gyroAngle) + 360 + 180) % 360) - 180.0); // angle dash.AddDouble(0.0); // angular rate dash.AddDouble(targetX); // other X } dash.FinalizeCluster(); dash.AddCluster(); // target Info (2 elements) { dash.AddArray(); // targets { for (unsigned i = 0; i < targets.size(); i++) { dash.AddCluster(); // targets { dash.AddDouble(targets[i].m_score); // target score dash.AddCluster(); // Circle Description (5 elements) { dash.AddCluster(); // Position (2 elements) { dash.AddFloat((float) (targets[i].m_xPos / targets[i].m_xMax)); // X dash.AddFloat((float) targets[i].m_yPos); // Y } dash.FinalizeCluster(); dash.AddDouble(targets[i].m_rotation); // Angle dash.AddDouble(targets[i].m_majorRadius); // Major Radius dash.AddDouble(targets[i].m_minorRadius); // Minor Radius dash.AddDouble(targets[i].m_rawScore); // Raw score } dash.FinalizeCluster(); // Position } dash.FinalizeCluster(); // targets } } dash.FinalizeArray(); dash.AddU32((int) 0); } dash.FinalizeCluster(); // target Info } dash.FinalizeCluster(); // wire dash.Finalize(); } |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Default Labview Dashboard and Windriver Example Help | sircedric4 | Programming | 7 | 02-25-2009 01:58 AM |
| Dashboard in WindRiver | xtreampb | C/C++ | 1 | 02-13-2009 12:36 AM |
| Please help Program Relays in WindRiver.... | programmr | Programming | 6 | 01-28-2009 11:42 AM |
| Need help in c++ and windriver | jkjohnson | C/C++ | 3 | 01-13-2009 06:50 PM |
| help:Downloading the project in windriver | mahmosh | C/C++ | 5 | 01-10-2009 10:08 AM |