Camera de/serialization, folder management

This commit is contained in:
Banks Troutman
2019-11-19 12:43:38 -05:00
parent 5f535f68da
commit cab2e759e4
11 changed files with 222 additions and 25 deletions

View File

@@ -15,6 +15,8 @@ import edu.wpi.first.networktables.NetworkTableInstance;
import java.io.IOException;
import java.util.function.Consumer;
import static com.chameleonvision.settings.Platform.CurrentPlatform;
public class Main {
private static final String NT_SERVERMODE_KEY = "--nt-servermode"; // no args for this setting
@@ -44,8 +46,6 @@ public class Main {
}
}
private static final Platform CurrentPlatform = Platform.getCurrentPlatform();
private static void handleArgs(String[] args) {
for (int i = 0; i < args.length; i++) {
var key = args[i].toLowerCase();
@@ -127,13 +127,13 @@ public class Main {
CameraServerJNI.forceLoad();
CameraServerCvJNI.forceLoad();
} catch (UnsatisfiedLinkError | IOException e) {
if(Platform.getCurrentPlatform().isWindows())
if(CurrentPlatform.isWindows()) {
System.err.println("Try to download the VC++ Redistributable, https://aka.ms/vs/16/release/vc_redist.x64.exe");
}
throw new RuntimeException("Failed to load JNI Libraries!");
}
if (testMode) {
// todo: boot in to the new classabstraction stuff
boolean visionSourcesOk = VisionManager.initializeSources();
if (!visionSourcesOk) {
System.out.println("No cameras connected!");