mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
removed old ui src and moved new one to its location and builded ui for distribution
This commit is contained in:
@@ -122,11 +122,10 @@ public class Camera {
|
||||
cvSource = cs.putVideo(name, newVideoMode.width, newVideoMode.height);
|
||||
}
|
||||
ServerHandler.sendFullSettings();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void addPipeline() {
|
||||
public void addPipeline() {
|
||||
addPipeline(pipelines.size());
|
||||
}
|
||||
|
||||
@@ -134,6 +133,9 @@ public class Camera {
|
||||
if (pipelines.containsKey(pipelineNumber)) return;
|
||||
pipelines.put(pipelineNumber, new Pipeline());
|
||||
}
|
||||
public void deleteCurrentPipeline() {
|
||||
pipelines.remove(getCurrentPipelineIndex());
|
||||
}
|
||||
|
||||
public Pipeline getCurrentPipeline() {
|
||||
return pipelines.get(currentPipelineIndex);
|
||||
|
||||
@@ -79,9 +79,7 @@ public class CameraManager {
|
||||
|
||||
private static boolean addCamera(Camera camera, String cameraName) {
|
||||
if (AllCamerasByName.containsKey(cameraName)) return false;
|
||||
for (int i = 0; i < 10; i++){
|
||||
camera.addPipeline(); // simple fix to create more pipelines for now
|
||||
}
|
||||
camera.addPipeline();
|
||||
AllCamerasByName.put(cameraName, camera);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,17 @@ public class ServerHandler {
|
||||
break;
|
||||
}
|
||||
case "command": {
|
||||
System.err.println("not implemented");
|
||||
switch ((String) entry.getValue()){
|
||||
case "addNewPipeline":
|
||||
CameraManager.getCurrentCamera().addPipeline();
|
||||
break;
|
||||
case "deleteCurrentPipeline":
|
||||
var cam = CameraManager.getCurrentCamera();
|
||||
CameraManager.getCurrentCamera().deleteCurrentPipeline();
|
||||
CameraManager.getCurrentCamera().setCurrentPipelineIndex(cam.getCurrentPipelineIndex() -1);
|
||||
sendFullSettings();
|
||||
break;
|
||||
}
|
||||
// used to define all incoming commands
|
||||
break;
|
||||
}
|
||||
@@ -99,7 +109,7 @@ public class ServerHandler {
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
broadcastMessage(deserialized,context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user