Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   NetworkTable Problem (http://www.chiefdelphi.com/forums/showthread.php?t=142734)

sebastian.m.842 01-28-2016 07:47 PM

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()
    {
           
    }
}


TimTheGreat 01-28-2016 10:01 PM

Re: NetworkTable Problem
 
Quote:

Originally Posted by sebastian.m.842 (Post 1531728)

Code:

            contourReport = NetworkTable.getTable("GRIP/myContoursReport");

IIRC the name has to be "SmartDashboard", not a custom name.

mmaunu 01-28-2016 10:13 PM

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).

MoHottaMoBetta 01-29-2016 04:21 PM

Re: NetworkTable Problem
 
Quote:

Originally Posted by TimTheGreat (Post 1531787)
IIRC the name has to be "SmartDashboard", not a custom name.

The 2016 GRIP example here clearly uses a different name.

Are you simply suggesting that SD may only see the "SmartDashboard" part of the network table and that the data may actually be there?

TimTheGreat 01-29-2016 06:34 PM

Re: NetworkTable Problem
 
Quote:

Originally Posted by MoHottaMoBetta (Post 1532126)
The 2016 GRIP example here clearly uses a different name.

Are you simply suggesting that SD may only see the "SmartDashboard" part of the network table and that the data may actually be there?

Yes. But I'm only pretty sure.


All times are GMT -5. The time now is 08:27 AM.

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