Skip to content

Commit c91df33

Browse files
authored
Fix default gateway in static IP config to match VH-109 DHCP config (#2364)
The default gateway handed out by the vh-109 dhcp server is .4, not .1. prompted by https://www.chiefdelphi.com/t/photonvision-not-accessible-over-vh109-running-ap-firmware/514418/29
1 parent 9d9a55c commit c91df33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

photon-core/src/main/java/org/photonvision/common/networking/NetworkManager.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,10 @@ private void setConnectionStatic(NetworkConfig config) {
223223
return;
224224
}
225225

226-
// guess at the gateway from the staticIp
226+
// Default gateway handed out by the VH-109 DHCP server is 10.TE.AM.4
227+
// https://docs.wpilib.org/en/stable/docs/networking/networking-introduction/ip-configurations.html#on-the-field-dhcp-configuration
227228
String[] parts = config.staticIp.split("\\.");
228-
parts[parts.length - 1] = "1";
229+
parts[parts.length - 1] = "4";
229230
String gateway = String.join(".", parts);
230231

231232
var shell = new ShellExec();

0 commit comments

Comments
 (0)