Issues With Shuffleboard Widgets in C++

Shuffleboard widgets duplicating in C++


Issue description:

When trying to update widgets via Shuffleboard in C++, a new widget is added instead of an existing one updating.

What I’d like to happen:

I would like an existing widget’s data to be changed (for example, a boolean box changing from false to true)

What happens:

A new widget with the same title and type as the original is created but the value changes to the desired value.


My code:

1st try, source file:

  if (m_waitingRoomState == redBall) {
    frc::Shuffleboard::GetTab("Drive Core")
      .Add("Room Ball Red", true)
      .WithWidget("Boolean Box")
      .GetEntry();
  }

This produces the previously mentioned result.
2nd try, source file:

  if (m_waitingRoomState == redBall) {
    m_roomBallRedBoard.PutBoolean(true);
  }

header file:

  nt::NetworkTableEntry m_roomBallRedBoard = frc::Shuffleboard::GetTab("Drive Core")

    .Add("Room Ball Red", false)

    .WithWidget("Toggle Button")

    .GetEntry();

This was recommended to me but fails to compile due to there not being a PutBoolean method.


If there is any other info that would help, please tell me so I can add it.

Thanks for any help!

The method is SetBoolean, not PutBoolean.

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