mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
bugfix in delete pipeline in ui, changed pipelines to be a list instead of a hashmap, ui renaming
- changed pipeline delete message to be Can not remove the only pipeline! - duplicate pipeline window will display current pipeline on open - duplicate windows button changed from discard to cancel
This commit is contained in:
@@ -94,8 +94,15 @@ public class ServerHandler {
|
||||
sendFullSettings();
|
||||
break;
|
||||
case "deleteCurrentPipeline":
|
||||
cam.deleteCurrentPipeline();
|
||||
cam.setCurrentPipelineIndex(cam.getCurrentPipelineIndex() - 1);
|
||||
int currentIndex = cam.getCurrentPipelineIndex();
|
||||
int nextIndex = 0;
|
||||
if (currentIndex == cam.getPipelines().size() - 1){
|
||||
nextIndex = currentIndex - 1;
|
||||
} else {
|
||||
nextIndex = currentIndex;
|
||||
}
|
||||
cam.deletePipeline();
|
||||
cam.setCurrentPipelineIndex(nextIndex);
|
||||
sendFullSettings();
|
||||
break;
|
||||
}
|
||||
@@ -107,17 +114,24 @@ public class ServerHandler {
|
||||
var cam = CameraManager.getCurrentCamera();
|
||||
HashMap<String, Object> tmp = new HashMap<>();
|
||||
tmp.put("pipeline", cam.getCurrentPipeline());
|
||||
tmp.put("pipelineList", cam.getPipelines().keySet());
|
||||
tmp.put("pipelineList", cam.getPipelinesNickname());
|
||||
tmp.put("port", cam.getStreamPort());
|
||||
tmp.put("resolutionList", cam.getResolutionList());
|
||||
broadcastMessage(tmp);
|
||||
break;
|
||||
}
|
||||
case "currentPipeline": {
|
||||
CameraManager.getCurrentCamera().setCurrentPipelineIndex((Integer) entry.getValue());
|
||||
var cam = CameraManager.getCurrentCamera();
|
||||
cam.setCurrentPipelineIndex((Integer) entry.getValue());
|
||||
HashMap<String, Object> tmp = new HashMap<>();
|
||||
tmp.put("pipeline", getOrdinalPipeline());
|
||||
broadcastMessage(tmp);
|
||||
try {
|
||||
cam.setBrightness(cam.getCurrentPipeline().brightness);
|
||||
cam.setExposure(cam.getCurrentPipeline().exposure);
|
||||
}catch (Exception e){
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user