mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-28 02:11:40 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user