Shuffleboard Not Autopopulating Tabs

Hello,

My team is working with the built-in WPI simulator and viewing outputs on the Shuffleboard. When we create tabs and add components, they only show up in the NetworkTables but don’t autopopulate on the Shuffleboard. Values that should go to the default SmartDashboard or LiveView tables do autopopulate however. And oddly, it autopopulates on one of our programmer’s computer’s (the one who wrote the code to make the tabs) but not the rest. We made sure we all have the same Shuffleboard / JDK / Wpilib versions also. I’m not sure if anyone else has had this issue or has any idea why this might be happening but I’d appreciate any help. Thanks!


1 Like

What does your code look like?

public Device(String name) {

    int i = name.indexOf(' ');

    this.name = name.substring(i + 1);

    deviceMap.put(this.name, this);

    ShuffleboardTab tab = Shuffleboard.getTab(name.substring(0, (i == -1) ? name.length():i));

    layout = tab.getLayout(this.name, BuiltInLayouts.kList)

    .withSize(2,6)

    .withProperties(Map.of("Label position", "TOP"));

}



protected ComplexWidget putData(String name, Sendable s) {

    return layout.add(name, s);

}

This is creating (or accessing an existing) tab with the name as the first word of whatever String is passed in.

Try setting a position. I tried your code and that seems to fix the problem:

layout = tab.getLayout(this.name, BuiltInLayouts.kList)
    .withSize(2,6)
    .withProperties(Map.of("Label position", "TOP"))
    .withPosition(1, 1);

You have to give unique positions or they’ll all overlap though.

Jeez that worked! I have no idea why it worked for one of our programmers but not the rest but you just saved us loads more debugging. Thanks so much!

1 Like

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