diff --git a/backend/app/handlers/SocketHandler.py b/backend/app/handlers/SocketHandler.py index 6733506aa..909878614 100644 --- a/backend/app/handlers/SocketHandler.py +++ b/backend/app/handlers/SocketHandler.py @@ -60,8 +60,10 @@ class ChameleonWebSocket(tornado.websocket.WebSocketHandler): def send_full_settings(self): full_settings = self.settings_manager.general_settings.copy() full_settings["cameraList"] = list(self.settings_manager.cams.copy().keys()) + try: full_settings.update(self.settings_manager.get_curr_pipeline()) + full_settings["pipelineList"] = list(self.settings_manager.cams[self.settings_manager.general_settings["curr_camera"]]["pipelines"].keys()) except NoCameraConnectedException: # TODO: return something if no camera connected full_settings["data"] = None diff --git a/backend/settings/cams/USB Camera-B4.09.24.1.json b/backend/settings/cams/USB Camera-B4.09.24.1.json index 6d51fbd07..2397af2ee 100644 --- a/backend/settings/cams/USB Camera-B4.09.24.1.json +++ b/backend/settings/cams/USB Camera-B4.09.24.1.json @@ -1 +1 @@ -{"pipelines": {"pipeline0": {"exposure": 50, "brightness": 50, "orientation": "Normal", "resolution": [320, 160], "hue": [0, 58], "saturation": [0, 100], "value": [0, 100], "erode": false, "dilate": false, "area": [0, 100], "ratio": [0, 20], "extent": [0, 100], "is_binary": "Normal"}}, "path": "/dev/v4l/by-path/pci-0000:02:03.0-usb-0:1:1.0-video-index0", "video_mode": {"fps": 187, "width": 320, "height": 240, "pixel_format": "kYUYV"}} \ No newline at end of file +{"pipelines": {"pipeline0": {"exposure": 34, "brightness": 11, "orientation": "Normal", "resolution": 1, "hue": [50, 58], "saturation": [65, 76], "value": [63, 79], "erode": false, "dilate": false, "area": [0, 100], "ratio": [0, 20], "extent": [0, 100], "is_binary": "Normal"}}, "path": "/dev/v4l/by-path/pci-0000:02:03.0-usb-0:1:1.0-video-index0", "video_mode": {"fps": 187, "width": 320, "height": 240, "pixel_format": "kYUYV"}} \ No newline at end of file diff --git a/chameleon-client/src/components/Vision.vue b/chameleon-client/src/components/Vision.vue index bd67ca065..3963a1582 100644 --- a/chameleon-client/src/components/Vision.vue +++ b/chameleon-client/src/components/Vision.vue @@ -3,10 +3,10 @@
- + - +
@@ -52,9 +52,9 @@ return this.$store.state.cameraList; } }, - piplineList:{ + pipelineList:{ get: function(){ - return this.$store.state.piplineList; + return this.$store.state.pipelineList; } }, steamAdress: { diff --git a/chameleon-client/src/store.js b/chameleon-client/src/store.js index f1f021862..03647c86d 100644 --- a/chameleon-client/src/store.js +++ b/chameleon-client/src/store.js @@ -9,8 +9,10 @@ export const store = new Vuex.Store({ state:{ //header - camera:0, - pipeline:0, + curr_camera:"", + curr_pipeline:"", + cameraList:[], + pipelineList:[], //input exposure:54, brightness:0, @@ -36,8 +38,6 @@ export const store = new Vuex.Store({ streamAdress:("http://"+location.hostname + ":1181/stream.mjpg"), isBinaryImage:0, //camera lists - cameraList:[], - pipelineList:[] }, mutations:{