mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-21 01:01:41 +00:00
fixed gain slider not updating
This commit is contained in:
@@ -52,7 +52,8 @@ public class SocketHandler {
|
||||
@SuppressWarnings("unchecked")
|
||||
void onBinaryMessage(WsBinaryMessageContext context) throws Exception {
|
||||
Map<String, Object> deserialized = objectMapper.readValue((byte[]) ArrayUtils.toPrimitive(context.data()),
|
||||
new TypeReference<>(){});
|
||||
new TypeReference<>() {
|
||||
});
|
||||
for (Map.Entry<String, Object> entry : deserialized.entrySet()) {
|
||||
try {
|
||||
VisionProcess currentProcess = VisionManager.getCurrentUIVisionProcess();
|
||||
@@ -168,6 +169,10 @@ public class SocketHandler {
|
||||
currentCamera.setBrightness((Integer) entry.getValue());
|
||||
break;
|
||||
}
|
||||
case "gain": {
|
||||
currentCamera.setGain((Integer) entry.getValue());
|
||||
break;
|
||||
}
|
||||
case "videoModeIndex": {
|
||||
if (currentPipeline instanceof StandardCVPipeline)
|
||||
((StandardCVPipeline) currentPipeline).settings.point = new ArrayList<>();//This will reset the calibration
|
||||
|
||||
Reference in New Issue
Block a user