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
This commit is contained in:
Ryan Blue
2026-02-17 15:32:24 -05:00
committed by GitHub
parent 9d9a55cbae
commit c91df33b63

View File

@@ -223,9 +223,10 @@ public class NetworkManager {
return;
}
// guess at the gateway from the staticIp
// Default gateway handed out by the VH-109 DHCP server is 10.TE.AM.4
// https://docs.wpilib.org/en/stable/docs/networking/networking-introduction/ip-configurations.html#on-the-field-dhcp-configuration
String[] parts = config.staticIp.split("\\.");
parts[parts.length - 1] = "1";
parts[parts.length - 1] = "4";
String gateway = String.join(".", parts);
var shell = new ShellExec();