mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] SetServerTeam: Use Systemcore name/addresses (#8314)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -289,9 +289,8 @@ 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,
|
||||
m_username, m_password);
|
||||
session = std::make_unique<sftp::Session>("robot.local", 22,
|
||||
m_username, m_password);
|
||||
} else {
|
||||
session = std::make_unique<sftp::Session>(m_serverTeam, 22,
|
||||
m_username, m_password);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user