SmartDashboard Implementation in RobotMain Test() method.

We are attempting to operate, and test robot functions using the Test() method.

We want to print out certain values to the SmartDashboard to view while we are testing our robot functions. When we attempt to print, for example:

SmartDashboard:: PutNumber("Encoder 1: ", m_pEncoder->Get());

It will not show up when we enable in test mode.
Any help appreciated!

  • Team 3284 Programming Team

I would also really like to know this.

I think FIRST intends the test mode to be used for LiveWindow, which is bassicaly a class in WPILIB which displays all of your actutors, sensors , PID loops, etc on the dashboard and allows you to manually control them. Are you using RoboBuilder or just the SimpleRobot templete or what? I know RobotBuilder adds LiveWindow for you, and I’m not sure if LiveWindow blocks all other SmartDashboard stuff or the test mode itself.

AFAIK, Test mode only displays LiveWindow widgets. They are stored in an entirely different network table.

You could override the startCompetition method of IterativeRobot to not set LiveWindow Enabled to true.

Hey Joe,

Thanks for your suggestion. It lead us disabling the LiveWindow in the Test() method itself. Here is our code:

In our constructor:

    // Get the instance of the Live Window.
    m_pLiveWindow = LiveWindow::GetInstance();

In the Test() method:

    // Disable the LiveWindow in Test mode.
    // This allows us to use the standard SmartDashboard calls in Test().
    m_pLiveWindow->SetEnabled(false);

If anyone else has this issue, please let us know if we can help.

Thanks again,
LASER 3284 Programming Team