![]() |
Updating the Dashboard
probably moving from LV to Java for 2014, starting to think about how we did some things in LV, and what the corresponding analogs in Java would be. Can't start slinging code for a while, no cRIOs to practice with (all are on bots), so asking questions right now instead of trying.
If one has put together a command based Java robot, and one wants to have continuous updates in the dashboard of critical sensors, is creating and scheduling a TimerTask to do the updates a good practice? I'm looking at Frog Force' 2013 code: Code:
private static final TimerTask SpeedTask = new TimerTask(){ |
Re: Updating the Dashboard
We actually use a Command to update values to the dashboard, which, if you're calling Scheduler.getInstance().run() in both Periodic() methods, has the same effect as that TimerTask (though a different frequency). I have considered changing it to something that will send data regardless of whether the robot is enabled, but I'm loathe to change working code any more than I have to. Maybe next year.
|
Re: Updating the Dashboard
We used the timer task so we could change the frame rate of the speed control without effecting everything else, for most of the sensor stuff we either put it where the sensor was being used, or in the main file's teleopPeriodic. Either way works, however, putting them in teleopPeriodic is probably a bit more organized.
|
Re: Updating the Dashboard
We're very interested in this:
Quote:
|
Re: Updating the Dashboard
Quote:
|
Re: Updating the Dashboard
Quote:
|
Re: Updating the Dashboard
Quote:
|
| All times are GMT -5. The time now is 22:32. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi