Alright, I got the code to compile and I am trying to send the actual data now. However, I am not getting any values in the outline viewer. Here is my setup:
- Raspberry pi hooked up through ethernet to router which is also connected to roborio.
- Here is my code on the robot side:
Robot.cpp
Code:
static std::shared_ptr<NetworkTable> table;
NetworkTable::SetIPAddress("10.20.53.21");
NetworkTable::SetClientMode();
NetworkTable::Initialize();
table = NetworkTable::GetTable("vision");
GoalAlign.cpp
Code:
distanceToCenter = Robot::table->GetNumber("center", 0.0);
- On the raspberry pi side
Code:
std::shared_ptr<NetworkTable> visionTable;
visionTable = NetworkTable::GetTable("vision");
visionTable->PutNumber("center", distanceCenter);
I'm not sure if I am doing this correctly. I'm not getting any errors but I'm not getting any values either.
- Drew