Skip to content

Commit

Permalink
RioLog: don't connect to localhost (#691)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rzblue authored Sep 16, 2024
1 parent 534363b commit 8feb3c8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/wpilib-riolog/src/rioconnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ interface IDriverStationData {
}

const constantIps: string[] = [
'172.22.11.2',
'127.0.0.1',
'172.22.11.2'
//, '127.0.0.1',
// Uncomment the above line for testing on localhost.
];

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

0 comments on commit 8feb3c8

Please sign in to comment.