Adds field IP to round robin list (#187)

With how many more coprocessors are being added, this is probably needed
to make the field crew sane.
This commit is contained in:
Thad House
2017-02-09 00:55:01 -08:00
committed by Peter Johnson
parent 13457d1bf4
commit e6656326a8
2 changed files with 11 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ void NetworkTable::SetClientMode() { s_client = true; }
void NetworkTable::SetServerMode() { s_client = false; }
void NetworkTable::SetTeam(int team) {
std::pair<StringRef, unsigned int> servers[4];
std::pair<StringRef, unsigned int> servers[5];
// 10.te.am.2
llvm::SmallString<32> fixed;
@@ -73,6 +73,14 @@ void NetworkTable::SetTeam(int team) {
servers[3] = std::make_pair(oss.str(), s_port);
}
// roboRIO-<team>-FRC.frc-field.local
llvm::SmallString<64> field_local;
{
llvm::raw_svector_ostream oss{field_local};
oss << "roboRIO-" << team << "-FRC.frc-field.local";
servers[4] = std::make_pair(oss.str(), s_port);
}
nt::SetServer(servers);
}