mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Cleanups, fixed isValid glitch
This commit is contained in:
@@ -24,7 +24,6 @@ public class Main {
|
||||
|
||||
private static final int DEFAULT_PORT = 8888;
|
||||
|
||||
private static int webserverPort = DEFAULT_PORT;
|
||||
private static boolean ntServerMode = false;
|
||||
private static boolean manageNetwork = true;
|
||||
private static boolean ignoreRoot = false;
|
||||
@@ -43,7 +42,7 @@ public class Main {
|
||||
}
|
||||
}
|
||||
|
||||
public static final Platform CurrentPlatform = Platform.getCurrentPlatform();
|
||||
private static final Platform CurrentPlatform = Platform.getCurrentPlatform();
|
||||
|
||||
private static void handleArgs(String[] args) {
|
||||
for (int i = 0; i < args.length; i++) {
|
||||
@@ -127,12 +126,10 @@ public class Main {
|
||||
|
||||
// Attempt to load the JNI Libraries
|
||||
try {
|
||||
if (CurrentPlatform.equals(Platform.LINUX_ARM64))
|
||||
CameraServerJNI.forceLoad();
|
||||
CameraServerCvJNI.forceLoad();
|
||||
} catch (IOException e) {
|
||||
var errorStr = CurrentPlatform.equals(Platform.UNSUPPORTED) ? "Unsupported platform!" : "Failed to load JNI Libraries!";
|
||||
throw new RuntimeException(errorStr);
|
||||
throw new RuntimeException("Failed to load JNI Libraries!");
|
||||
}
|
||||
|
||||
if (CameraManager.initializeCameras()) {
|
||||
@@ -152,6 +149,7 @@ public class Main {
|
||||
}
|
||||
}
|
||||
|
||||
int webserverPort = DEFAULT_PORT;
|
||||
System.out.printf("Starting Webserver at port %d\n", webserverPort);
|
||||
Server.main(webserverPort);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user