I am attempting to use the network tables class to pass values from my SmartDashboard extensions to the robot.
This thread describes the process using Java
http://www.chiefdelphi.com/forums/sh...d.php?t=103352
but it seems to imply near the end that the same process will not work for C++
In my code and in the windows API I could find equivalent commands though- for everything other than begin and end transaction.
Without these, the robot crashes as soon an i try TableName->GetNumber("",0);
Am I missing something?
Code:
//declarations:
NetworkTable *Vision;
float d;
//initialization
Vision->GetTable("VisionTable");//should create table if does not exist
//control loop (where it crashes)
if (Vision->IsConnected())
{
//Vision->beginTransaction();
d = Vision->GetNumber("d",0);//where 0 is default if "d" does not exist
//Vision->endTransaction();
}