mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
More UI fixes, add videomode and StreamDivisor to config
This commit is contained in:
@@ -43,21 +43,17 @@ public class RequestHandler {
|
||||
VisionProcess currentVisionProcess = VisionManager.getCurrentUIVisionProcess();
|
||||
CameraCapture currentCamera = currentVisionProcess.getCamera();
|
||||
|
||||
Number newFOV = (Number) camSettings.get("fov");
|
||||
Double newFOV = (Double) camSettings.get("fov");
|
||||
Integer newStreamDivisor = (Integer) camSettings.get("streamDivisor");
|
||||
Integer newResolution = (Integer) camSettings.get("resolution");
|
||||
|
||||
currentCamera.getProperties().setFOV((double) newFOV);
|
||||
currentCamera.getProperties().setFOV(newFOV);
|
||||
|
||||
currentVisionProcess.cameraStreamer.setDivisor(StreamDivisor.values()[newStreamDivisor], true);
|
||||
|
||||
// TODO: Video Mode Index!!!!
|
||||
// var currentResolutionIndex = curCam.getVideoModeIndex();
|
||||
// if (currentResolutionIndex != newResolution) {
|
||||
// curCam.setCamVideoMode(newResolution, true);
|
||||
// }
|
||||
currentCamera.setVideoMode(newResolution);
|
||||
|
||||
VisionManager.saveAllCameras();
|
||||
VisionManager.saveCurrentCameraSettings();
|
||||
SocketHandler.sendFullSettings();
|
||||
ctx.status(200);
|
||||
} catch (JsonProcessingException e) {
|
||||
|
||||
Reference in New Issue
Block a user