Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Help with dashboard packing... (http://www.chiefdelphi.com/forums/showthread.php?t=81928)

Al3+ 02-04-2010 11:40 PM

Help with dashboard packing...
 
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.

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.

Also, what's the difference between the high and low priority packers? Can they be used interchangeably?

jhersh 02-05-2010 02:17 AM

Re: Help with dashboard packing...
 
Quote:

Originally Posted by Al3+ (Post 913706)
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+ (Post 913706)
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+ (Post 913706)
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

Al3+ 02-06-2010 01:34 AM

Re: Help with dashboard packing...
 
Yes, some time after the robot starts, the tabs and buttons stop responding to presses, and I can't do anything. The only way to get out of it is to reboot or to end it with Task Manager.

I'm not sure whether it's directly connected to the dashboard problem, but it stopped happening after I commented out the code.

Maybe I should upload my dashboard file.


All times are GMT -5. The time now is 10:38 AM.

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