mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-20 00:51:41 +00:00
added driver mode tab to settings in the ui
This commit is contained in:
@@ -229,26 +229,26 @@ public class Camera {
|
||||
public void setDriverMode(boolean state)
|
||||
{
|
||||
Map<String,Integer> data = new HashMap<>();
|
||||
isDriver=state;
|
||||
if(isDriver){
|
||||
UsbCam.setBrightness(driverBrightness);
|
||||
UsbCam.setBrightness(driverBrightness);
|
||||
try{UsbCam.setExposureManual(driverExposure);}
|
||||
catch (VideoException e)
|
||||
{
|
||||
System.out.println("Exposure change isnt supported");
|
||||
}
|
||||
data.put("brightness",getBrightness());
|
||||
data.put("exposure",driverExposure);
|
||||
}
|
||||
else{
|
||||
UsbCam.setBrightness(getCurrentPipeline().brightness);
|
||||
UsbCam.setBrightness(getCurrentPipeline().brightness);
|
||||
try{UsbCam.setExposureManual(getCurrentPipeline().exposure);}
|
||||
catch (VideoException e)
|
||||
{
|
||||
System.out.println("Exposure change isnt supported");
|
||||
isDriver=state;
|
||||
if(isDriver){
|
||||
UsbCam.setBrightness(driverBrightness);
|
||||
UsbCam.setBrightness(driverBrightness);
|
||||
try{UsbCam.setExposureManual(driverExposure);}
|
||||
catch (VideoException e)
|
||||
{
|
||||
System.out.println("Exposure change isnt supported");
|
||||
}
|
||||
data.put("brightness",getBrightness());
|
||||
data.put("exposure",driverExposure);
|
||||
}
|
||||
else{
|
||||
UsbCam.setBrightness(getCurrentPipeline().brightness);
|
||||
UsbCam.setBrightness(getCurrentPipeline().brightness);
|
||||
try{UsbCam.setExposureManual(getCurrentPipeline().exposure);}
|
||||
catch (VideoException e)
|
||||
{
|
||||
System.out.println("Exposure change isnt supported");
|
||||
}
|
||||
data.put("brightness",getBrightness());
|
||||
data.put("exposure",getCurrentPipeline().exposure);
|
||||
}
|
||||
|
||||
@@ -114,6 +114,7 @@ public class ServerHandler {
|
||||
break;
|
||||
case "save":
|
||||
SettingsManager.saveSettings();
|
||||
System.out.println("saved Settings");
|
||||
break;
|
||||
}
|
||||
// used to define all incoming commands
|
||||
|
||||
Reference in New Issue
Block a user