![]() |
Update Dashboard data prior to match start
Our team is new to the usage of C++ this year and so far it has been a very pleasant switch from LV. One of the things that we never had working properly (due to low priority) was the ability to send data to the driver station while not in isAutonomous or isOperatorControl. The desire is to get feedback for data such as air pressure from a transducer on an analog channel or amount of shoot delay from a potentiometer connected to the Cypress IO board before the match begins.
Once in either of these modes, data sent to the DS using DriverStation::GetInstance() -> GetLowPriorityDashboardPacker() (as outlined in the WPI example), then adding the data to a cluster is clean and consistent. When using LabView this was easily accomplished using the PeriodTasks vi wrapper, and I can only imagine there is a similar structure and/or capability in C++. This request is mainly due to the lack in understanding on the C++ class and call structures in FRC. For reference, we are using the standard LabView based dashboard. Any help on where to place these calls to send data while in would be greatly appreciated. |
Re: Update Dashboard data prior to match start
The method to do this is slightly different depending on if you're using SimpleRobot or IterativeRobot, but the idea is pretty much the same. In addition to the Teleop and Autonomous states, there is a Disabled state. You can put the Dashboard calls into this code.
For SimpleRobot: The template Wind River gives you will not exit from Autonomous or OperatorControl when disabled, you'll probably want to change this. Add IsEnabled() to the check for the while loop (ie while (IsOperatorControl()) becomes while (IsOperatorControl() && IsEnabled()). Now, make a new function Disabled(). It should look something like this: Code:
...Good luck to you |
| All times are GMT -5. The time now is 13:27. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi