Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   SmartDashboard Implementation in RobotMain Test() method. (http://www.chiefdelphi.com/forums/showthread.php?t=134137)

orbobigge 07-02-2015 15:15

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

FleventyFive 07-02-2015 19:12

Re: SmartDashboard Implementation in RobotMain Test() method.
 
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.

Ben Wolsieffer 07-02-2015 19:30

Re: SmartDashboard Implementation in RobotMain Test() method.
 
AFAIK, Test mode only displays LiveWindow widgets. They are stored in an entirely different network table.

Joe Ross 07-02-2015 21:00

Re: SmartDashboard Implementation in RobotMain Test() method.
 
You could override the startCompetition method of IterativeRobot to not set LiveWindow Enabled to true.

orbobigge 08-02-2015 12:30

Re: SmartDashboard Implementation in RobotMain Test() method.
 
Quote:

Originally Posted by Joe Ross (Post 1439993)
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:
Code:

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

In the Test() method:
Code:

    // 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


All times are GMT -5. The time now is 12:07.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi