Hi all,
I've recently been working on a custom widget for SmartDashboard that is a running line graph of the last 200 values sent (or 4 seconds at 50Hz). I'm planning to release it later after a bit more polish and customization goes into it.
It works great, the only problem I'm having now is it doesn't update when the values coming in aren't changing.
My best guess is one of these 2:
- the setValue(Object o) method of the Widget is only called when the value is different from the last (on dashboard side)
- NetworkTable values are only sent to the SmartDashboard when they are different from the last (on robot side)
and I completely understand why this might be a design decision for performance.
Does anyone have any tips on where this goes on, or how to make it take in every value? I'm not shy about editing the SmartDashboard source and recompiling, but I'm a little more hesistant to muck around in WPILib (using Java, by the way.) I poked around a bit in the SmartDashboard source but didn't find what I was looking for.
One potential solution we came up with was to alternate adding or subtracting a miniscule amount (all values are Doubles) to trigger a send, which wouldn't be too bad as you don't see the numbers - it's just graphical. But if we can get it working without that it would be preferred.
Thanks!