[ntcore] SetServerTeam: Use Systemcore name/addresses (#8314)

This commit is contained in:
Thad House
2025-12-16 22:28:45 -08:00
committed by GitHub
parent e2d492ac3f
commit d6b54bbae2
3 changed files with 12 additions and 16 deletions

View File

@@ -685,18 +685,17 @@ void SetServerTeam(NT_Inst inst, unsigned int team, unsigned int port) {
static_cast<int>(team % 100)),
port);
// 172.22.11.2
servers.emplace_back("172.22.11.2", port);
// 172.26.0.1 (Windows USB)
servers.emplace_back("172.26.0.1", port);
// roboRIO-<team>-FRC.local
servers.emplace_back(fmt::format("roboRIO-{}-FRC.local", team), port);
// 172.27.0.1 (Unix USB)
servers.emplace_back("172.27.0.1", port);
// roboRIO-<team>-FRC.lan
servers.emplace_back(fmt::format("roboRIO-{}-FRC.lan", team), port);
// 172.30.0.1 (WiFi)
servers.emplace_back("172.30.0.1", port);
// roboRIO-<team>-FRC.frc-field.local
servers.emplace_back(fmt::format("roboRIO-{}-FRC.frc-field.local", team),
port);
// robot.local
servers.emplace_back(fmt::format("robot.local", team), port);
ii->SetServers(servers);
}

View File

@@ -289,8 +289,7 @@ void Downloader::ThreadMain() {
if (auto team =
wpi::util::parse_integer<unsigned int>(m_serverTeam, 10)) {
// team number
session = std::make_unique<sftp::Session>(
fmt::format("roborio-{}-frc.local", team.value()), 22,
session = std::make_unique<sftp::Session>("robot.local", 22,
m_username, m_password);
} else {
session = std::make_unique<sftp::Session>(m_serverTeam, 22,

View File

@@ -40,10 +40,8 @@ int main() {
connect->Disconnected();
});
});
connect->SetServers({{{"roborio-294-frc.local", 8080},
{"roborio-294-frc.frc-field.local", 8080},
{"10.2.94.2", 8080},
{"127.0.0.1", 8080}}});
connect->SetServers(
{{{"robot.local", 8080}, {"10.2.94.2", 8080}, {"127.0.0.1", 8080}}});
});
// wait for a keypress to terminate