Shuffleboard Custom Data Type

So I’ve been trying on and off for a few weeks to get a Shuffleboard plugin to work using a custom data type. WPILIB has their fair share of examples on how to create a custom data type and I can get it to compile, and run successfully though Shuffleboard, but how do you push an instance of that data type from the rio to the network tables? Wouldn’t the robot code need to have the plugin as a dependency in order to do that? And how can you put up this datatype if the network tables don’t support it? Is it even possible? If not what is the point of custom data types?

What I’m currently trying to do is get both the plugin and the robot code to use another library of type I created. The robot code can create and instance of it and send it to the Network Tables (as a Map) where the plugin can read it (from that map). That would work, and it complies, however the dependencies are not working, and I am constantly getting a NoClassDefError every time the widget gets initialized. No matter what I’ve tried with the build.gradle and .classpath, nothing seems to resolve the issue.

You do not need to use classes from your Shuffleboard plugin in your robot code.
In your robot code, implement Sendable


Then, register the Sendable and add an instance of it to your desired ShuffleboardTab

In the plugin code, it will use all of the values associated with your Sendable to make a new instance of your data type.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.