Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to add raw network table Entries/paths Via Shuffleboard API #29

Open
m10653 opened this issue Feb 1, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@m10653
Copy link

m10653 commented Feb 1, 2024

Currently if you load load Elastic from a file you are able to display and view values directly out of network tables. However this is not possible to do programmatically via the Shuffleboard api. Where it is required to publish a second duplicate record of the data to network tables to be viewable within the dashboard. This is specifically a problem when wanting to view vision data or values from a co-processor publishing to network tables directly. Where the only way to programmatically publish these would be to read the data from network tables and republish it to shuffleboard on the robot adding unneeded latency.

It would be nice to be able to just tell elastic to look at a particular network table entry/path by only publishing the string of the path itself vs needing to send a copy of the value.

@m10653 m10653 added the enhancement New feature or request label Feb 1, 2024
@Gold872
Copy link
Owner

Gold872 commented Feb 3, 2024

This can already be done, but It's not really documented anywhere. Elastic stores the NT topic as a property, so it can be manually set with the Shuffleboard API via the widget's properties. To do this when adding a widget, you would use the withProperties() method.

Here's an example:

Shuffleboard.getTab("Example Tab").add("Example Widget", 0.0) // 0.0 will never be displayed, so it doesn't really matter what you put for it
  .withProperties(Map.of("topic", "Whatever/Topic/You/Want/To/Display"));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants