Ensure CSM calibration pane updates from Skip to Next on successful calibration.

This commit is contained in:
Julian Stirling 2026-07-07 18:47:35 +01:00
parent 6e19c73dd3
commit 22c1394aad

View file

@ -17,7 +17,7 @@
@update:task-status="taskStatus = $event" @update:task-status="taskStatus = $event"
@update:log="log = $event" @update:log="log = $event"
@task-started="$emit('prevent-navigation', true)" @task-started="$emit('prevent-navigation', true)"
@finished="$emit('prevent-navigation', false)" @finished="csmFinished"
/> />
</div> </div>
</template> </template>
@ -52,10 +52,26 @@ export default {
}, },
methods: { methods: {
/**
* Check is camera stage mapping is calibrated and emit the result to awaiting-user.
*
* "awaiting-user" is used to signal that the user should perform an action before
* continuing. In practice it changes the next button to "skip".
*/
async checkCalibrationState() { async checkCalibrationState() {
const needsCal = await this.readThingProperty("camera_stage_mapping", "calibration_required"); const needsCal = await this.readThingProperty("camera_stage_mapping", "calibration_required");
this.$emit("awaiting-user", needsCal); this.$emit("awaiting-user", needsCal);
}, },
/**
* Tuns whenever CSM finishes re-enable navigation and check calibration state.
*
* This happens if the action is cancelled, errors, or completes successfully as it
* is triggered by `finished`.
*/
async csmFinished() {
this.$emit("prevent-navigation", false);
await this.checkCalibrationState();
},
}, },
}; };
</script> </script>