I want to do this because it doesn’t appear that the SmartDashboard class has the ability to use runnables, forcing us to put SmartDashboard stuff in various periodic methods.
Have you considered using Shuffleboard instead of SmartDashboard? The tab layout isn’t supported by SmartDashboard; the data will still be visible, but none of the layout metadata will be used.
You could also use Oblog, or else make your classes implement the Sendable interface and use the putData method.
We are using the Shuffleboard. We have separate tabs for each subsystem outputting various bits of sensor data. But we have the SmartDashboard tab as the “main” page that the driver looks at with the camera, the auto mode selector and a few select indicators.
All the data that’s on NT should be viewable on SmartDashboard, so anything you put on Shuffleboard will be there, too. You will have to dig around in the NT tree to find it, though (it will be classed under “Shuffleboard”).
We are trying out Oblog this year but does not seem to be working. Nothing appears on Shuffleboard using @Log notation. Don’t see anything in any of the tabs or in Network Tables section. Tried adding SmartDashboard put method to see if that worked, and it does. We looked at other team repos on github. Seems like we are doing similar things as in those repos. Here are our changes used to test: https://github.com/BHSRobotix/RapidReact2022/commit/3e948b04aa1b4a488947144d5d875ec27a2aac7f
Any ideas/suggestions what to look at next would be much appreciated.
Follow the getting started instructions on the Oblog docs. Per @vargoose84’s post above, to log fields in classes other than the root container you need to make those classes implement Loggable.
We did follow those instructions. It does not state anywhere to add implements Loggable to any class. Did we miss it? Perhaps it is implied… I am completely new to annotations in Java.