Go to Post Based on my experience coaching basketball and robotics, there is no doubt in my mind that if a sports coach receives $x then a robotics coach should, too. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2016, 19:47
sebastian.m.842 sebastian.m.842 is offline
Registered User
FRC #0842
 
Join Date: Jan 2016
Location: Arizona
Posts: 2
sebastian.m.842 is on a distinguished road
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()
    {
    	
    }
}
Reply With Quote
  #2   Spotlight this post!  
Unread 28-01-2016, 22:01
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NetworkTable Problem

Quote:
Originally Posted by sebastian.m.842 View Post

Code:
    	contourReport = NetworkTable.getTable("GRIP/myContoursReport");
IIRC the name has to be "SmartDashboard", not a custom name.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #3   Spotlight this post!  
Unread 28-01-2016, 22:13
mmaunu's Avatar
mmaunu mmaunu is offline
Registered User
FRC #2485 (W.A.R. Lords)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2010
Location: San Diego, CA
Posts: 87
mmaunu is a jewel in the roughmmaunu is a jewel in the roughmmaunu is a jewel in the roughmmaunu is a jewel in the rough
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).
__________________
2014 Las Vegas (Winners with 987, 2478; Excellence in Engineering)
2014 San Diego (Finalists with 987, 3250; Quality Award)
2013 Inland Empire (Winners with 1538, 968; Excellence in Engineering Award)
2013 San Diego (Finalists with 2984, 4322; Creativity Award)
2012 Las Vegas (Finalists with 2034, 3187; Quality Award)
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2016, 16:21
MoHottaMoBetta's Avatar
MoHottaMoBetta MoHottaMoBetta is offline
Mentor
AKA: Bruce Kahn
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2011
Location: Phoenix
Posts: 12
MoHottaMoBetta is an unknown quantity at this point
Re: NetworkTable Problem

Quote:
Originally Posted by TimTheGreat View Post
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?
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2016, 18:34
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: NetworkTable Problem

Quote:
Originally Posted by MoHottaMoBetta View Post
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.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:51.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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