mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
removed old ui src and moved new one to its location and builded ui for distribution
This commit is contained in:
@@ -1,119 +1,75 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
Vue.use(Vuex);
|
||||
Vue.use(Vuex)
|
||||
|
||||
const set = key => (state,val) =>{
|
||||
state[key] = val
|
||||
Vue.set(state,key,val);
|
||||
};
|
||||
export const store = new Vuex.Store({
|
||||
|
||||
state:{
|
||||
//header
|
||||
curr_camera:"",
|
||||
curr_pipeline:"",
|
||||
cameraList:[],
|
||||
pipelineList:[],
|
||||
//input
|
||||
exposure:54,
|
||||
brightness:0,
|
||||
orientation:0,
|
||||
resolution:0,
|
||||
resolutionList:[],
|
||||
FOV:0,
|
||||
//threshold
|
||||
hue:[0,10],
|
||||
saturation:[0,10],
|
||||
value:[0,10],
|
||||
erode: false,
|
||||
dilate: false,
|
||||
//contours
|
||||
area:[0,100],
|
||||
ratio:[0,20],
|
||||
extent:[0,100],
|
||||
sort_mode:'Largest',
|
||||
target_group:'Single',
|
||||
target_intersection:'Up',
|
||||
//Settings
|
||||
team_number:0,
|
||||
connection_type:"DHCP",
|
||||
ip:"",
|
||||
gateway:"",
|
||||
netmask:"",
|
||||
hostname:"",
|
||||
//live info
|
||||
port:1181,
|
||||
is_binary:0,
|
||||
//points
|
||||
raw_point:[],
|
||||
point:{}
|
||||
|
||||
export default new Vuex.Store({
|
||||
state: {
|
||||
settings:{
|
||||
teamNumber:1577,
|
||||
connectionType:0,
|
||||
ip:"",
|
||||
gateway:"",
|
||||
netmask:"",
|
||||
hostname: "Chameleon-vision"
|
||||
},
|
||||
mutations:{
|
||||
curr_camera (state,value){
|
||||
state['curr_camera'] = value;
|
||||
state['pipeline'] = "0";
|
||||
},
|
||||
curr_pipeline: set('curr_pipeline'),
|
||||
brightness: set('brightness'),
|
||||
exposure: set('exposure'),
|
||||
orientation:set('orientation'),
|
||||
resolution: set('resolution'),
|
||||
hue: set('hue'),
|
||||
saturation: set('saturation'),
|
||||
value: set('value'),
|
||||
erode: set('erode'),
|
||||
dilate: set('dilate'),
|
||||
area: set('area'),
|
||||
ratio: set('ratio'),
|
||||
extent: set('extent'),
|
||||
team_number: set('team_number'),
|
||||
connection_type: set('connection_type'),
|
||||
ip: set('ip'),
|
||||
netmask: set('netmask'),
|
||||
gateway : set('gateway'),
|
||||
hostname : set('hostname'),
|
||||
is_binary: set('is_binary'),
|
||||
cameraList : set('cameraList'),
|
||||
pipelineList: set('piplineList'),
|
||||
sort_mode: set('sort_mode'),
|
||||
target_group:set('target_group'),
|
||||
target_intersection:set('target_intersection'),
|
||||
FOV:set('FOV'),
|
||||
port:set('port'),
|
||||
raw_point:set('raw_point'),
|
||||
point:set('point')
|
||||
pipeline:{
|
||||
exposure:0,
|
||||
brightness:0,
|
||||
orientation:0,
|
||||
hue:[0,15],
|
||||
saturation:[0,15],
|
||||
value:[0,25],
|
||||
erode:false,
|
||||
dilate:false,
|
||||
area:[0,12],
|
||||
ratio:[0,12],
|
||||
extent:[0,12],
|
||||
targetGrouping:0,
|
||||
targetIntersection:0,
|
||||
sortMode:0,
|
||||
isBinary:0
|
||||
},
|
||||
getters:{
|
||||
curr_camera: state => state.curr_camera,
|
||||
curr_pipeline: state => state.curr_pipeline,
|
||||
brightness: state => state.brightness,
|
||||
exposure: state => state.exposure,
|
||||
orientation: state => state.orientation,
|
||||
resolution: state => state.resolution,
|
||||
hue: state => state.hue,
|
||||
saturation: state => state.saturation,
|
||||
value: state => state.value,
|
||||
erode: state => state.dilate,
|
||||
dilate: state => state.dilate,
|
||||
area: state =>state.area,
|
||||
ratio: state =>state.ratio,
|
||||
extent: state =>state.extent,
|
||||
team_number: state => state.teamValue,
|
||||
connection_type: state => state.connectionType,
|
||||
ip: state => state.ip,
|
||||
netmask: state => state.netmask,
|
||||
gateway: state => state.gateway,
|
||||
hostname: state => state.hostName,
|
||||
is_binary: state => state.is_binary,
|
||||
cameraList: state => state.cameraList,
|
||||
pipelineList: state => state.pipelineList,
|
||||
sort_mode: state => state.sort_mode,
|
||||
target_group: state => state.target_group,
|
||||
target_intersection: state => state.target_intersection,
|
||||
FOV: state => state.FOV,
|
||||
port: state => state.port,
|
||||
raw_point:state => state.raw_point,
|
||||
point: state => state.point
|
||||
|
||||
},
|
||||
});
|
||||
cameraSettings:{},
|
||||
resolutionList:[],
|
||||
port:1181,
|
||||
currentCameraIndex:0,
|
||||
currentPipelineIndex:0,
|
||||
cameraList:[],
|
||||
pipelineList:[],
|
||||
point:{}
|
||||
},
|
||||
mutations: {
|
||||
settings: set('settings'),
|
||||
pipeline: set('pipeline'),
|
||||
cameraSettings: set('cameraSettings'),
|
||||
resolutionList: set('resolutionList'),
|
||||
port: set('port'),
|
||||
currentCameraIndex: set('currentCameraIndex'),
|
||||
currentPipelineIndex: set('currentPipelineIndex'),
|
||||
cameraList: set('cameraList'),
|
||||
pipelineList: set('pipelineList'),
|
||||
point:set('point')
|
||||
},
|
||||
actions: {
|
||||
settings: state => state.settings,
|
||||
pipeline: state => state.pipeline,
|
||||
cameraSettings: state =>state.cameraSettings,
|
||||
resolutionList: state =>state.resolutionList,
|
||||
port: state =>state.port,
|
||||
currentCameraIndex: state =>state.currentCameraIndex,
|
||||
currentPipelineIndex: state =>state.currentPipelineIndex,
|
||||
cameraList: state =>state.cameraList,
|
||||
pipelineList: state =>state.pipelineList,
|
||||
point: state =>state.point,
|
||||
setPipeValues(state,obj){
|
||||
for(let i in obj){
|
||||
Vue.set(state.pipeline,i,obj[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user