wpilibsuite / SmartDashboard

Other
24 stars 28 forks source link

Update SmartDashboard to use WPILib-2023.4.3 NetworkTable APIs #173

Open chauser opened 1 year ago

chauser commented 1 year ago

I'm posting this as a preliminary effort, not yet ready for merging.

After having some issues with SmartDashboard this season I thought I would attempt to contribute an update to use current NetworkTables APIs rather than being forever stuck on the ITable inteface that was already deprecated in 2021.

This is the state of things so far. There are a few changes pending that have been made in PRs for the WPILib 2021 version and not yet ported here. I'll keep this in Draft status 'til those are done.

This is my first foray into programming directly with the NT API so please excuse and correct any awkwardnesses that I may have committed. One question that I have about the API is that it has interfaces named both TableListener and SubTableListener that appear essentially identical. I think I eventually decided I needed SubTableListener, but I'm wondering about the use of TableListener.

Thinking about this longer-term: what do the WPILib team and FRC teams in general want to see happen with SmartDashboard? Speaking for my team, we like SmartDashboard's relative lightweight (compared to Shuffleboard) for a competition dashboard that only needs to provide controls for configuring the robot. We have no interest in using it for development, robot tuning, etc. -- glass works fine for that. Similarly, on-robot logging supplants the need to do any logging from the dashboard for us. Given that, I see little value in adding LiveWindow widgets for many of the sendables that have been added to WPILib in recent years. And given SmartDashboard's primitive automatic layout ability produces really unusable results for the large number of Sendables in current-day robot code I have to wonder whether removing the LiveWindow displays altogether would be preferable to the current jumble of supported and unsupported LiveWindow types.

ThadHouse commented 1 year ago

patch.txt

You can apply this diff to fix the build, automatically include wpinet and fix the live window test project too.