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