Hide error from CSM if it's uncalibrated
The error still appears in the console - should be fixed eventually.
This commit is contained in:
parent
a31c0aa835
commit
f87594e7af
2 changed files with 9 additions and 11 deletions
|
|
@ -201,15 +201,12 @@ export default {
|
||||||
show: async function() {
|
show: async function() {
|
||||||
// Check if the camera and stage are calibrated, if they can be
|
// Check if the camera and stage are calibrated, if they can be
|
||||||
if (this.canCSMCalibrated) {
|
if (this.canCSMCalibrated) {
|
||||||
try {
|
let csm = this.readThingProperty(
|
||||||
let csm = this.readThingProperty(
|
"camera_stage_mapping",
|
||||||
"camera_stage_mapping",
|
"image_to_stage_displacement_matrix",
|
||||||
"image_to_stage_displacement_matrix"
|
true
|
||||||
);
|
);
|
||||||
this.isCSMCalibrated = Boolean(csm);
|
this.isCSMCalibrated = Boolean(csm);
|
||||||
} catch {
|
|
||||||
this.isCSMCalibrated = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.canLSTCalibrated) {
|
if (this.canLSTCalibrated) {
|
||||||
this.isLSTCalibrated = this.readThingProperty(
|
this.isLSTCalibrated = this.readThingProperty(
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ Vue.mixin({
|
||||||
thingAvailable(thing) {
|
thingAvailable(thing) {
|
||||||
return this.$store.getters["wot/thingAvailable"](thing);
|
return this.$store.getters["wot/thingAvailable"](thing);
|
||||||
},
|
},
|
||||||
async readThingProperty(thing, property) {
|
async readThingProperty(thing, property, silence_errors = false) {
|
||||||
let url = this.$store.getters["wot/thingPropertyUrl"](
|
let url = this.$store.getters["wot/thingPropertyUrl"](
|
||||||
thing,
|
thing,
|
||||||
property,
|
property,
|
||||||
|
|
@ -51,7 +51,8 @@ Vue.mixin({
|
||||||
let response = await axios.get(url);
|
let response = await axios.get(url);
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.modalError(error);
|
if (!silence_errors) this.modalError(error);
|
||||||
|
return undefined;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async writeThingProperty(thing, property, value) {
|
async writeThingProperty(thing, property, value) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue