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)),
|
static_cast<int>(team % 100)),
|
||||||
port);
|
port);
|
||||||
|
|
||||||
// 172.22.11.2
|
// 172.26.0.1 (Windows USB)
|
||||||
servers.emplace_back("172.22.11.2", port);
|
servers.emplace_back("172.26.0.1", port);
|
||||||
|
|
||||||
// roboRIO-<team>-FRC.local
|
// 172.27.0.1 (Unix USB)
|
||||||
servers.emplace_back(fmt::format("roboRIO-{}-FRC.local", team), port);
|
servers.emplace_back("172.27.0.1", port);
|
||||||
|
|
||||||
// roboRIO-<team>-FRC.lan
|
// 172.30.0.1 (WiFi)
|
||||||
servers.emplace_back(fmt::format("roboRIO-{}-FRC.lan", team), port);
|
servers.emplace_back("172.30.0.1", port);
|
||||||
|
|
||||||
// roboRIO-<team>-FRC.frc-field.local
|
// robot.local
|
||||||
servers.emplace_back(fmt::format("roboRIO-{}-FRC.frc-field.local", team),
|
servers.emplace_back(fmt::format("robot.local", team), port);
|
||||||
port);
|
|
||||||
|
|
||||||
ii->SetServers(servers);
|
ii->SetServers(servers);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,9 +289,8 @@ void Downloader::ThreadMain() {
|
|||||||
if (auto team =
|
if (auto team =
|
||||||
wpi::util::parse_integer<unsigned int>(m_serverTeam, 10)) {
|
wpi::util::parse_integer<unsigned int>(m_serverTeam, 10)) {
|
||||||
// team number
|
// team number
|
||||||
session = std::make_unique<sftp::Session>(
|
session = std::make_unique<sftp::Session>("robot.local", 22,
|
||||||
fmt::format("roborio-{}-frc.local", team.value()), 22,
|
m_username, m_password);
|
||||||
m_username, m_password);
|
|
||||||
} else {
|
} else {
|
||||||
session = std::make_unique<sftp::Session>(m_serverTeam, 22,
|
session = std::make_unique<sftp::Session>(m_serverTeam, 22,
|
||||||
m_username, m_password);
|
m_username, m_password);
|
||||||
|
|||||||
@@ -40,10 +40,8 @@ int main() {
|
|||||||
connect->Disconnected();
|
connect->Disconnected();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
connect->SetServers({{{"roborio-294-frc.local", 8080},
|
connect->SetServers(
|
||||||
{"roborio-294-frc.frc-field.local", 8080},
|
{{{"robot.local", 8080}, {"10.2.94.2", 8080}, {"127.0.0.1", 8080}}});
|
||||||
{"10.2.94.2", 8080},
|
|
||||||
{"127.0.0.1", 8080}}});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// wait for a keypress to terminate
|
// wait for a keypress to terminate
|
||||||
|
|||||||
Reference in New Issue
Block a user