Fixed camera setting paload
This commit is contained in:
parent
2d34389e16
commit
61c8d00d95
1 changed files with 16 additions and 12 deletions
|
|
@ -4,35 +4,37 @@
|
||||||
<div>
|
<div>
|
||||||
<label class="uk-form-label" for="form-stacked-text">Exposure time</label>
|
<label class="uk-form-label" for="form-stacked-text">Exposure time</label>
|
||||||
<div class="uk-form-controls">
|
<div class="uk-form-controls">
|
||||||
<input v-model="displayShutterSpeed" class="uk-input uk-form-small" type="number">
|
<input v-bind:value="displayShutterSpeed" v-on:input="shutterSpeed = $event.target.value" class="uk-input uk-form-small" type="number">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="uk-form-label" for="form-stacked-text">Analogue gain</label>
|
<label class="uk-form-label" for="form-stacked-text">Analogue gain</label>
|
||||||
<div class="uk-form-controls">
|
<div class="uk-form-controls">
|
||||||
<input v-model="displayAnalogGain" class="uk-input uk-form-small" type="number" step="0.01">
|
<input v-bind:value="displayAnalogGain" v-on:input="analogGain = $event.target.value" class="uk-input uk-form-small" type="number" step="0.01">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label class="uk-form-label" for="form-stacked-text">Digital gain</label>
|
<label class="uk-form-label" for="form-stacked-text">Digital gain</label>
|
||||||
<div class="uk-form-controls">
|
<div class="uk-form-controls">
|
||||||
<input v-model="displayDigitalGain" class="uk-input uk-form-small" type="number" step="0.01">
|
<input v-bind:value="displayDigitalGain" v-on:input="digitalGain = $event.target.value" class="uk-input uk-form-small" type="number" step="0.01">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="uk-button uk-button-primary uk-form-small uk-float-right uk-margin-small uk-width-1-1">Apply Settings</button>
|
<button type="submit" class="uk-button uk-button-primary uk-form-small uk-float-right uk-margin-small uk-width-1-1">Apply Settings</button>
|
||||||
|
|
||||||
<div v-if="isCalibrating">
|
<!--Show auto calibrate if default plugin is enabled-->
|
||||||
<progressBar/>
|
<div v-if="this.$store.state.apiState.plugin.includes('default_camera_calibration')">
|
||||||
</div>
|
<div v-if="isCalibrating">
|
||||||
|
<progressBar/>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div v-bind:hidden="isCalibrating">
|
<div v-bind:hidden="isCalibrating">
|
||||||
<button type="button" v-on:click="recalibrateConfirm()" class="uk-button uk-button-default uk-form-small uk-float-right uk-margin-small uk-width-1-1">Auto-Calibrate</button>
|
<button type="button" v-on:click="recalibrateConfirm()" class="uk-button uk-button-default uk-form-small uk-float-right uk-margin-small uk-width-1-1">Auto-Calibrate</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -70,7 +72,9 @@ export default {
|
||||||
applyConfigRequest: function() {
|
applyConfigRequest: function() {
|
||||||
console.log("Applying config to the microscope")
|
console.log("Applying config to the microscope")
|
||||||
var payload = {
|
var payload = {
|
||||||
picamera_settings: {}
|
camera_settings: {
|
||||||
|
picamera_settings: {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (this.shutterSpeed != this.$store.state.apiConfig.picamera_settings.shutter_speed) {
|
//if (this.shutterSpeed != this.$store.state.apiConfig.picamera_settings.shutter_speed) {
|
||||||
|
|
@ -86,7 +90,7 @@ export default {
|
||||||
return this.$store.dispatch('updateConfig');
|
return this.$store.dispatch('updateConfig');
|
||||||
})
|
})
|
||||||
.then(this.updateInputValues)
|
.then(this.updateInputValues)
|
||||||
.then(r=>{console.log("Updated Config: ", payload.picamera_settings)})
|
.then(r=>{console.log("Updated Config: ", payload)})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
this.modalError(error) // Let mixin handle error
|
this.modalError(error) // Let mixin handle error
|
||||||
})
|
})
|
||||||
|
|
@ -134,7 +138,7 @@ export default {
|
||||||
return Number(this.analogGain).toFixed(2)
|
return Number(this.analogGain).toFixed(2)
|
||||||
},
|
},
|
||||||
displayShutterSpeed: function () {
|
displayShutterSpeed: function () {
|
||||||
return (this.shutterSpeed != 0) ? this.shutterSpeed : "auto"
|
return (this.shutterSpeed != "0") ? this.shutterSpeed : "auto"
|
||||||
},
|
},
|
||||||
recalibrateApiUri: function () {
|
recalibrateApiUri: function () {
|
||||||
return this.$store.getters.uri + "/plugin/default/camera_calibration/recalibrate"
|
return this.$store.getters.uri + "/plugin/default/camera_calibration/recalibrate"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue