View Single Post
  #2   Spotlight this post!  
Unread 02-05-2010, 02:17 AM
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Help with dashboard packing...

Quote:
Originally Posted by Al3+ View Post
Alright. So I modified the dashboard and removed everything from it except the camera image and the robot IP (which was needed for the image to show). Then I added a single boolean indicator, and put this in my code:

Code:
...
Dashboard *dash;
...
void SendDashboardData()
{
  dash = &DriverStation::getInstance()->GetHighPriorityDashboardPacker();
  dash->AddBoolean(true);
  dash->Finalize();
}
And I call SendDashboardData() on each iteration inside OperatorControl. However, when I try to run this, it doesn't work, and sometimes causes all sorts of problems by freezing up the driver station.
Freezing up the driver station? What makes you say that? Will the Tabs not switch? What exactly is the behavior?

Quote:
Originally Posted by Al3+ View Post
What's the proper way to do this? I've looked at the DashboardDataFormat.cpp example but it seems to be written for the default dashboard with all the clusters on it.
It was written to match... and they have to. If you pack 1 boolean into the high priority, for instance, then you need to unpack 1 boolean from high priority on the dashboard side.

Quote:
Originally Posted by Al3+ View Post
Also, what's the difference between the high and low priority packers? Can they be used interchangeably?
The high priority will be sent even if there are errors to report to the driver station. Low priority will not be sent if there is no space because of errors to be reported. Also, If there is not enough space for high and low priority, then only high priority will be sent.

They can be used interchangably, as long as you interchange them on the dashboard side and the robot side at the same time.

-Joe
Reply With Quote