integration of piplines and cams into UI

This commit is contained in:
ori
2019-06-15 13:23:49 -07:00
parent 3dbe097fce
commit aed12aafb4
4 changed files with 11 additions and 9 deletions

View File

@@ -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

View File

@@ -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"}}
{"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"}}

View File

@@ -3,10 +3,10 @@
<Header id="main-header">
<Row type="flex" justify="start" align="middle" :gutter="10">
<Col span="12">
<chselect title="camera" :list="cameraList" Xkey="camera"></chselect>
<chselect title="camera" :list="cameraList" Xkey="curr_camera"></chselect>
</Col>
<Col span="12">
<chselect title="pipline" :list="piplineList" Xkey="pipeline"></chselect>
<chselect title="pipline" :list="pipelineList" Xkey="curr_pipeline"></chselect>
</Col>
</Row>
</Header>
@@ -52,9 +52,9 @@
return this.$store.state.cameraList;
}
},
piplineList:{
pipelineList:{
get: function(){
return this.$store.state.piplineList;
return this.$store.state.pipelineList;
}
},
steamAdress: {

View File

@@ -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:{