Can I use sendable chooser on table other than SmartDashboard?

I am using Shuffleboard. I have a few tabs which auto-populate based on different NetworkTables… tables. From the documentation it seems I can only use SendableChooser via the SmartDashboard api. Is it possible to get a SendableChooser added under my own custom NetworkTable so it will appear on a non SmartDashboard tab?

Yes, but it isn’t easy.

But it is easy to use the Shuffleboard API in your robot program to add the chooser to a tab of your choice. In your case, I’d write something like this:

Shuffleboard.getTab("Lift Settings")
  .add(autoChooser);

You can also define where the widget should be placed, how large it should be (as long as the position is specified), and what widget to use to display it with.

Note that tabs defined from the robot program cannot be autopopulated, since you’re expected to specify the contents in your robot code, and these tabs are not included in save files (again, since it’s expected to be defined purely from robot code).

http://wpilib.screenstepslive.com/s/currentCS/m/shuffleboard/c/278280
http://first.wpi.edu/FRC/roborio/release/docs/java/edu/wpi/first/wpilibj/shuffleboard/Shuffleboard.html

Thank you. I was using the method you’re describing earlier in the project but moved to mostly using ntproperty (python only?) when I realized the robot code generated tabs were not included in the save file. Plus the ntproperty is really concise in the robot code.
I’m not sure I realized I was giving up sendable choosers on those tabs when I made that decision. But nice to know the is a way to do it if I really want to. What would it take to have NetworkTable.putData() call?

Hey side question, the PDP widget looks really cool… what would I have to do to use that and have it know where to source its data from?

That’s a PowerDistributionPanel object.

Thanks @auscompgeek I had that much figured out :grin: … I was looking for a little guidance on how I would connect that PDP object to the data from my actual PDP on the robot. I know the PDP is on the CAN bus… Do I need to query all the data and populate the PDP dashboard widget myself… do I just assign a CAN ID somehow to that widget? Not sure where to start with that…

It connects automatically. When you instantiate a PowerDistributionPanel object it will add itself to LiveWindow and automatically populate with the data from the PDP.

1 Like

Cool. I’ll try it, thanks. Is there anyway to use it on a custom tab? If i don’t want to use it with LiveWindow?

You can drag and drop it from NT to the tab in Shuffleboard, or use the Shuffleboard classes to add the object to a tab.

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