|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
NetworkTable Problem
I am trying to putString to a NetworkTable and or the SmartDashBoard but every time I run the code it doesn't display anything to the SmartDashBoard. Any suggestions on how to make this work so we can see the tables on the SmartDashBoard?
Here is my code Code:
public class Robot extends IterativeRobot {
public static final ExampleSubsystem exampleSubsystem = new ExampleSubsystem();
public static OI oi;
NetworkTable contourReport;
public Robot()
{
contourReport = NetworkTable.getTable("GRIP/myContoursReport");
}
public void testPeriodic() {
LiveWindow.run();
SmartDashboard.putString("Hello", "World");
contourReport.putString("Hello", "World");
}
public void testInit()
{
}
}
|
|
#2
|
||||
|
||||
|
Re: NetworkTable Problem
IIRC the name has to be "SmartDashboard", not a custom name.
|
|
#3
|
||||
|
||||
|
Re: NetworkTable Problem
Try putting the SmartDashboard.putString() into teleopPeriodic() instead. When you run the robot in test() mode (which is what testPeriodic() is for), the SmartDashboard shows a different display...the LiveWindow display. For more on that, see here. Again, try putting a simple call to SmartDashboard in teleopPeriodic() and I think that you will be fine.
Also, we use SmartDashboard method calls without the NetworkTable code that you have and it works. I believe that the SmartDashboard method actually uses the NetworkTable to send the info across (it puts it into a SmartDashboard-specific data table, I believe...I'm not sure and should go look that up now). |
|
#4
|
||||
|
||||
|
Re: NetworkTable Problem
Quote:
Are you simply suggesting that SD may only see the "SmartDashboard" part of the network table and that the data may actually be there? |
|
#5
|
||||
|
||||
|
Re: NetworkTable Problem
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|