View Single Post
  #7   Spotlight this post!  
Unread 18-02-2016, 17:06
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: Network tables has already been initialized

Quote:
Originally Posted by StaleyRobotics View Post
This is some basic code we have been trying. We are still getting the same error. Any time we try to access the NetworkTables class we receive the error.

Code:
NetworkTable server;
	
	public Vision() {
		server = NetworkTable.getTable("SmartDashboard");
	}
	
	public void printImageCount() {
		try {
			double imageCount = server.getNumber("IMAGE_COUNT", 0.0);
			
			System.out.println(imageCount);
		}
		catch(TableKeyNotDefinedException exp) {
		}
	}
Is this in your robot program? If so, why are you getting the SmartDashboard table manually and not using the SmartDashboard.* functions?
Reply With Quote