Use default path for networktables.ini in simulation (#2205)

This commit is contained in:
Peter Johnson
2019-12-29 18:55:02 -06:00
committed by GitHub
parent 5b7dd186d2
commit 8b4508ad53
2 changed files with 9 additions and 1 deletions

View File

@@ -124,7 +124,11 @@ RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) {
auto inst = nt::NetworkTableInstance::GetDefault();
inst.SetNetworkIdentity("Robot");
#ifdef __FRC_ROBORIO__
inst.StartServer("/home/lvuser/networktables.ini");
#else
inst.StartServer();
#endif
SmartDashboard::init();

View File

@@ -94,7 +94,11 @@ public abstract class RobotBase implements AutoCloseable {
m_threadId = Thread.currentThread().getId();
setupCameraServerShared();
inst.setNetworkIdentity("Robot");
inst.startServer("/home/lvuser/networktables.ini");
if (isReal()) {
inst.startServer("/home/lvuser/networktables.ini");
} else {
inst.startServer();
}
m_ds = DriverStation.getInstance();
inst.getTable("LiveWindow").getSubTable(".status").getEntry("LW Enabled").setBoolean(false);