Using the following code:
public void initShuffleboardDataOnTab(ShuffleboardTab tab) {
var readingsLayout = tab.getLayout("Flywheel Measurements", BuiltInLayouts.kList)
.withSize(2, 5)
.withPosition(0, 0)
.withProperties(Map.of("Label position", "LEFT"));
readingsLayout.addNumber("target_voltage", this::getTargetVoltage).withPosition(0, 0).withSize(2, 1);
readingsLayout.addNumber("measured_voltage", this::getMeasuredVoltage).withPosition(0, 1).withSize(2, 1);
readingsLayout.addNumber("target_velocity", this::getTargetVelocity).withPosition(0, 2).withSize(2, 1);
readingsLayout.addNumber("measured_velocity", this::getTargetVelocity).withPosition(0, 3).withSize(2, 1);
readingsLayout.addBoolean("at_target_velocity", this::atTargetVelocity).withPosition(0, 4).withSize(2, 1);
}
Shuffleboard displays the following:
Observe that the order in which the list elements are displayed is not the same as the order in which they were added. Is there property I can set or some other mechanism that ensures the order is preserved?