Cleanups, fixed isValid glitch

This commit is contained in:
Banks Troutman
2019-10-10 15:07:56 -04:00
parent 8748dd2503
commit d56a27c017
16 changed files with 77 additions and 157 deletions

View File

@@ -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 {