mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[ntcore] Add ability to announce mDNS for server (#8373)
We can use this as a new way of resolving addresses.
This commit is contained in:
@@ -200,9 +200,9 @@ RobotBase::RobotBase() {
|
||||
// subscribe to "" to force persistent values to propagate to local
|
||||
wpi::nt::SubscribeMultiple(inst.GetHandle(), {{std::string_view{}}});
|
||||
if constexpr (!IsSimulation()) {
|
||||
inst.StartServer("/home/systemcore/networktables.json");
|
||||
inst.StartServer("/home/systemcore/networktables.json", "", "robot");
|
||||
} else {
|
||||
inst.StartServer();
|
||||
inst.StartServer("networktables.json", "", "robot");
|
||||
}
|
||||
|
||||
// wait for the NT server to actually start
|
||||
|
||||
@@ -186,9 +186,9 @@ class RobotStarter:
|
||||
msub = ntcore.MultiSubscriber(inst, [""])
|
||||
|
||||
if not isSimulation:
|
||||
inst.startServer("/home/systemcore/networktables.ini")
|
||||
inst.startServer("/home/systemcore/networktables.json", "", "robot")
|
||||
else:
|
||||
inst.startServer()
|
||||
inst.startServer("networktables.json", "", "robot")
|
||||
|
||||
# wait for the NT server to actually start
|
||||
for i in range(100):
|
||||
|
||||
Reference in New Issue
Block a user