Go to Post Meh, wear safety glasses. - Mike Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-01-2010, 15:26
ranc ranc is offline
Registered User
FRC #2489
 
Join Date: Feb 2009
Location: Fremont
Posts: 15
ranc is an unknown quantity at this point
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
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Labview Dashboard and Windriver Example Help sircedric4 Programming 7 25-02-2009 01:58
Dashboard in WindRiver xtreampb C/C++ 1 13-02-2009 00:36
Please help Program Relays in WindRiver.... programmr Programming 6 28-01-2009 11:42
Need help in c++ and windriver jkjohnson C/C++ 3 13-01-2009 18:50
help:Downloading the project in windriver mahmosh C/C++ 5 10-01-2009 10:08


All times are GMT -5. The time now is 15:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi