bug fixed the sync and bug fixed the pipe change from nt

This commit is contained in:
ori agranat
2019-09-29 08:01:00 -07:00
parent b13f145ee6
commit 4e6bd3e75a
2 changed files with 8 additions and 5 deletions

View File

@@ -87,11 +87,14 @@ public class VisionProcess implements Runnable {
System.err.println(e.toString());
}
camera.setBrightness(pipeline.brightness);
HashMap<String, Object> pipeChange = new HashMap<>();
pipeChange.put("curr_pipeline", ntPipelineIndex);
ServerHandler.broadcastMessage(pipeChange);
ServerHandler.sendFullSettings();
if (SettingsManager.GeneralSettings.curr_camera.equals(cameraName)){
SettingsManager.GeneralSettings.curr_pipeline = ntPipelineIndex;
HashMap<String, Object> pipeChange = new HashMap<>();
pipeChange.put("curr_pipeline", ntPipelineIndex);
ServerHandler.broadcastMessage(pipeChange);
ServerHandler.sendFullSettings();
}
} else {
ntPipelineEntry.setString("pipeline" + camera.getCurrentPipelineIndex());
}