mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-05 03:21:40 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -57,9 +57,7 @@ class ChameleonWebSocket(tornado.websocket.WebSocketHandler):
|
|||||||
|
|
||||||
for key in message_dic:
|
for key in message_dic:
|
||||||
self.actions.get(key, self.actions["change_pipeline_values"])(message_dic)
|
self.actions.get(key, self.actions["change_pipeline_values"])(message_dic)
|
||||||
|
|
||||||
print(message)
|
print(message)
|
||||||
self.write_message(message)
|
|
||||||
|
|
||||||
def on_close(self):
|
def on_close(self):
|
||||||
self.save_settings()
|
self.save_settings()
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"exposure": 21, "brightness": 71}
|
{"exposure": 32, "brightness": 36, "hue": [10, 45], "orientation": "Normal", "camera": "3", "resolution": "Normal"}
|
||||||
1
backend/settings/cams/cam1/pipeline5.json
Normal file
1
backend/settings/cams/cam1/pipeline5.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"exposure": 50, "brightness": 50}
|
||||||
@@ -76,7 +76,13 @@
|
|||||||
created () {
|
created () {
|
||||||
this.$options.sockets.onmessage = (data) => {
|
this.$options.sockets.onmessage = (data) => {
|
||||||
console.log(data.data);
|
console.log(data.data);
|
||||||
} // console writes recived data
|
let message = JSON.parse(data.data);
|
||||||
|
for (var prop in message){
|
||||||
|
if(message.hasOwnProperty(prop)){
|
||||||
|
this.$store.state[prop] = message[prop];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // console writes recived data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,12 +2,10 @@ import Vue from 'vue'
|
|||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex);
|
||||||
|
|
||||||
const set = key => (state,val) =>{
|
const set = key => (state,val) =>{
|
||||||
state[key] = val
|
state[key] = val
|
||||||
}
|
};
|
||||||
export const store = new Vuex.Store({
|
export const store = new Vuex.Store({
|
||||||
strict: true,
|
|
||||||
|
|
||||||
state:{
|
state:{
|
||||||
//header
|
//header
|
||||||
@@ -22,10 +20,12 @@ export const store = new Vuex.Store({
|
|||||||
hue:[0,10],
|
hue:[0,10],
|
||||||
saturation:[0,10],
|
saturation:[0,10],
|
||||||
value:[0,10]
|
value:[0,10]
|
||||||
|
|
||||||
},
|
},
|
||||||
mutations:{
|
mutations:{
|
||||||
camera: set('camera'),
|
camera (state,value){
|
||||||
|
state['camera'] = value;
|
||||||
|
state['pipeline'] = "0";
|
||||||
|
},
|
||||||
pipeline: set('pipeline'),
|
pipeline: set('pipeline'),
|
||||||
brightness: set('brightness'),
|
brightness: set('brightness'),
|
||||||
exposure: set('exposure'),
|
exposure: set('exposure'),
|
||||||
|
|||||||
Reference in New Issue
Block a user