View Single Post
  #10   Spotlight this post!  
Unread 01-03-2016, 06:12
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Network tables has already been initialized

The demo program I included was for a stand alone Java application (it runs outside of the Robot code and outside of the SmartDashboard).

It sounds like you are creating a SmartDashboard extension (plugin) module that is loaded by the SmartDashboard and run inside the SmartDashboard. If this is the case, then my guess is that the SmartDashboard has already set up and constructed the single instance of the NetworkTable connection object.

If you want to update values in a network table, my assumption is that you would skip all of the initialization steps and just grab the table you want to work with when you want to put a value out (similar to what you would do in Robot code). Something like:

Code:
NetworkTable table = NetworkTable.getTable("SmartDashboard");
table.putBoolean("FoundTarget", true);
Reply With Quote