View Single Post
  #4   Spotlight this post!  
Unread 15-01-2013, 12:08
cjlane1138 cjlane1138 is offline
Team 1138
FRC #1138 (Eagle Engineering)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 88
cjlane1138 is an unknown quantity at this point
Re: Problems forming NetworkTable between Robot and SmartDashboard

The issue is probably how you are initializing the NetworkTable. You are setting it to null, where it probably should be initialized. I have not yet worked with NetworkTable's, but you can try looking at the WPILib Cookbook. Also, since you have declared a variable, you can use it as a pointer, so instead of this:
Code:
RobotDemo(void):
		stick(1),
		jaguar(2),
		roborealmNetTable(NULL)
	{
		NetworkTable::SetTeam(1943);
		NetworkTable::SetIPAddress("10.19.43.5");
		NetworkTable::Initialize();
		
		roborealmNetTable = NetworkTable::GetTable("RoboRealm");
	}
You could try this:
Code:
RobotDemo(void):
		stick(1),
		jaguar(2)
	{
                roborealmNetTable = new NetworkTable("RoboRealm");
		roborealmNetTable->SetTeam(1943);
		roborealmNetTable->SetIPAddress("10.19.43.5");
		roborealm->Initialize();
		
	}
I'm sorry if this is incorrect. This just seems to be the most likely solution to the problem. I will work on NetworkTables later this week. Try this and let me know how it works out!
__________________
Eagle Engineering 1138