Fix ordering between CameraServer.getInstance and UsbCamera creation (#69)
If the CameraServer instance is started after the UsbCamer is created, it never gets the source created event to actually build the NetworkTable table.
This commit is contained in:
@@ -181,8 +181,8 @@ public final class Main {
|
||||
*/
|
||||
public static VideoSource startCamera(CameraConfig config) {
|
||||
System.out.println("Starting camera '" + config.name + "' on " + config.path);
|
||||
UsbCamera camera = new UsbCamera(config.name, config.path);
|
||||
CameraServer inst = CameraServer.getInstance();
|
||||
UsbCamera camera = new UsbCamera(config.name, config.path);
|
||||
MjpegServer server = inst.startAutomaticCapture(camera);
|
||||
|
||||
Gson gson = new GsonBuilder().create();
|
||||
|
||||
Reference in New Issue
Block a user