Skip to content

Commit 8feb3c8

Browse files
authored
RioLog: don't connect to localhost (#691)
127.0.0.1 was used for testing. The DS sends data to dashboards on localhost:1741, so some dashboards listen for a connection from driver station, and riolog will connect (but no data will be sent). Also logs which connection is actually used.
1 parent 534363b commit 8feb3c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libraries/wpilib-riolog/src/rioconnector.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ interface IDriverStationData {
2929
}
3030

3131
const constantIps: string[] = [
32-
'172.22.11.2',
33-
'127.0.0.1',
32+
'172.22.11.2'
33+
//, '127.0.0.1',
34+
// Uncomment the above line for testing on localhost.
3435
];
3536

3637
const teamIps: string[] = [
@@ -239,6 +240,7 @@ export async function connectToRobot(port: number, teamNumber: number, timeout:
239240
} else {
240241
// Kill all but me
241242
timer.cancel();
243+
console.log("Using " + firstDone.remoteAddress + ", disposing others");
242244
for (const p of pairs) {
243245
if (firstDone !== p.socket) {
244246
p.dispose();

0 commit comments

Comments
 (0)