mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
Added deletion for old nt table (after nickname change) and fixed a exposure set bug
This commit is contained in:
@@ -97,7 +97,7 @@ public class ServerHandler {
|
||||
case "deleteCurrentPipeline":
|
||||
int currentIndex = cam.getCurrentPipelineIndex();
|
||||
int nextIndex;
|
||||
if (currentIndex == cam.getPipelines().size() - 1){
|
||||
if (currentIndex == cam.getPipelines().size() - 1) {
|
||||
nextIndex = currentIndex - 1;
|
||||
} else {
|
||||
nextIndex = currentIndex;
|
||||
@@ -124,7 +124,7 @@ public class ServerHandler {
|
||||
try {
|
||||
cam.setBrightness(cam.getCurrentPipeline().brightness);
|
||||
cam.setExposure(cam.getCurrentPipeline().exposure);
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -133,11 +133,7 @@ public class ServerHandler {
|
||||
setField(CameraManager.getCurrentCamera().getCurrentPipeline(), entry.getKey(), entry.getValue());
|
||||
switch (entry.getKey()) {
|
||||
case "exposure": {
|
||||
try {
|
||||
CameraManager.getCurrentCamera().setExposure((Integer) entry.getValue());
|
||||
} catch (Exception e) {
|
||||
System.err.println("Camera Does not support exposure change");
|
||||
}
|
||||
CameraManager.getCurrentCamera().setExposure((Integer) entry.getValue());
|
||||
}
|
||||
case "brightness": {
|
||||
CameraManager.getCurrentCamera().setBrightness((Integer) entry.getValue());
|
||||
@@ -239,7 +235,7 @@ public class ServerHandler {
|
||||
fullSettings.put("pipelineList", currentCamera.getPipelinesNickname());
|
||||
fullSettings.put("resolutionList", currentCamera.getResolutionList());
|
||||
fullSettings.put("port", currentCamera.getStreamPort());
|
||||
fullSettings.put("currentPipelineIndex",CameraManager.getCurrentCamera().getCurrentPipelineIndex());
|
||||
fullSettings.put("currentPipelineIndex", CameraManager.getCurrentCamera().getCurrentPipelineIndex());
|
||||
fullSettings.put("currentCameraIndex", CameraManager.getCurrentCameraIndex());
|
||||
} catch (CameraException | IllegalAccessException e) {
|
||||
System.err.println("No camera found!");
|
||||
|
||||
Reference in New Issue
Block a user