mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
added set camera by index and bugfix in current camera
This commit is contained in:
@@ -118,6 +118,10 @@ public class CameraManager {
|
||||
SettingsManager.GeneralSettings.currentCamera = cameraName;
|
||||
SettingsManager.updateCameraSetting(cameraName, getCurrentCamera().getCurrentPipelineIndex());
|
||||
}
|
||||
public static void setCurrentCamera(int cameraIndex) throws CameraException {
|
||||
List<String> s = new ArrayList<String>(AllCamerasByName.keySet());
|
||||
setCurrentCamera(s.get(cameraIndex));
|
||||
}
|
||||
|
||||
public static Pipeline getCurrentPipeline() throws CameraException {
|
||||
return getCurrentCamera().getCurrentPipeline();
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ServerHandler {
|
||||
break;
|
||||
}
|
||||
case "currentCamera": {
|
||||
CameraManager.setCurrentCamera((String) entry.getValue());
|
||||
CameraManager.setCurrentCamera((Integer) entry.getValue());
|
||||
sendFullSettings();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user