added port handling and pipline change sync wth ui

- added port hash map
- putting port into hashmap from camera class
- added sending port from full settings and camera change 
- nt pipe change now sends pipe name to ui
This commit is contained in:
ori agranat
2019-09-21 18:52:28 +03:00
parent 4c315ac554
commit d97f3c1e1a
5 changed files with 14 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
package com.chameleonvision.vision.camera;
import com.chameleonvision.settings.SettingsManager;
import com.chameleonvision.vision.Pipeline;
import edu.wpi.cscore.*;
import edu.wpi.first.cameraserver.CameraServer;
@@ -68,6 +69,8 @@ public class Camera {
cvSink = cs.getVideo(UsbCam);
cvSource = cs.putVideo(name, camVals.ImageWidth, camVals.ImageHeight);
var s = (MjpegServer) cs.getServer("serve_" + name);
SettingsManager.CameraPorts.put(name, s.getPort());
}
public void setCamVideoMode(int videoMode) {