Ensure CSM calibration pane updates from Skip to Next on successful calibration.
This commit is contained in:
parent
6e19c73dd3
commit
22c1394aad
1 changed files with 17 additions and 1 deletions
|
|
@ -17,7 +17,7 @@
|
|||
@update:task-status="taskStatus = $event"
|
||||
@update:log="log = $event"
|
||||
@task-started="$emit('prevent-navigation', true)"
|
||||
@finished="$emit('prevent-navigation', false)"
|
||||
@finished="csmFinished"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -52,10 +52,26 @@ export default {
|
|||
},
|
||||
|
||||
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() {
|
||||
const needsCal = await this.readThingProperty("camera_stage_mapping", "calibration_required");
|
||||
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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue