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:
+1
-1
@@ -170,8 +170,8 @@ bool ReadConfig() {
|
||||
cs::UsbCamera StartCamera(const CameraConfig& config) {
|
||||
wpi::outs() << "Starting camera '" << config.name << "' on " << config.path
|
||||
<< '\n';
|
||||
cs::UsbCamera camera{config.name, config.path};
|
||||
auto inst = frc::CameraServer::GetInstance();
|
||||
cs::UsbCamera camera{config.name, config.path};
|
||||
auto server = inst->StartAutomaticCapture(camera);
|
||||
|
||||
camera.SetConfigJson(config.config);
|
||||
|
||||
Reference in New Issue
Block a user