Get default scan step size by API v2 FOV settings
This commit is contained in:
parent
fe20392a97
commit
e9c38cdb44
1 changed files with 24 additions and 9 deletions
|
|
@ -283,9 +283,9 @@ export default {
|
||||||
scanDeltaZ: "Medium",
|
scanDeltaZ: "Medium",
|
||||||
scanStyle: "Raster",
|
scanStyle: "Raster",
|
||||||
scanStepSize: {
|
scanStepSize: {
|
||||||
x: parseInt(0.8 * this.$store.state.apiConfig.fov[0]),
|
x: 0,
|
||||||
y: parseInt(0.8 * this.$store.state.apiConfig.fov[1]),
|
y: 0,
|
||||||
z: 50
|
z: 0
|
||||||
},
|
},
|
||||||
scanSteps: {
|
scanSteps: {
|
||||||
x: 3,
|
x: 3,
|
||||||
|
|
@ -308,14 +308,13 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
captureActionUri: function() {
|
captureActionUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/actions/camera/capture`;
|
||||||
this.$store.state.port
|
|
||||||
}/api/v2/actions/camera/capture`;
|
|
||||||
},
|
},
|
||||||
pluginsUri: function() {
|
pluginsUri: function() {
|
||||||
return `http://${this.$store.state.host}:${
|
return `${this.$store.getters.baseUri}/api/v2/plugins`;
|
||||||
this.$store.state.port
|
},
|
||||||
}/api/v2/plugins`;
|
settingsFovUri: function() {
|
||||||
|
return `${this.$store.getters.baseUri}/api/v2/settings/fov`;
|
||||||
},
|
},
|
||||||
basePayload: function() {
|
basePayload: function() {
|
||||||
var payload = {};
|
var payload = {};
|
||||||
|
|
@ -380,6 +379,7 @@ export default {
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.updateScanUri();
|
this.updateScanUri();
|
||||||
|
this.updateScanStepSize();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -420,6 +420,21 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateScanStepSize: function() {
|
||||||
|
axios
|
||||||
|
.get(this.settingsFovUri) // Get a list of plugins
|
||||||
|
.then(response => {
|
||||||
|
this.scanStepSize = {
|
||||||
|
x: parseInt(0.5 * response.data[0]),
|
||||||
|
y: parseInt(0.5 * response.data[1]),
|
||||||
|
z: 50
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
this.modalError(error); // Let mixin handle error
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
onScanSubmit: function() {},
|
onScanSubmit: function() {},
|
||||||
|
|
||||||
onScanResponse: function(responseData) {
|
onScanResponse: function(responseData) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue