mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
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:
committed by
Peter Johnson
parent
13457d1bf4
commit
e6656326a8
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user