Move Vue app to a js directory

This commit is contained in:
Kaspar Emanuel 2021-08-17 11:09:22 +01:00
parent 515bee1422
commit 13f7252dd7
72 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,50 @@
<docs>
[TODO: write documentation for this plugin.]
</docs>
<config lang="json">
{
"name": "Test OFM Stage",
"type": "web-worker",
"tags": [],
"ui": "",
"version": "0.1.0",
"cover": "",
"description": "Move the OFM stage to test the API works",
"icon": "extension",
"inputs": null,
"outputs": null,
"api_version": "0.1.8",
"env": "",
"permissions": [],
"requirements": [],
"dependencies": []
}
</config>
<script lang="javascript">
class ImJoyPlugin {
async setup() {
api.log('initialized')
}
async run(ctx) {
// get a list of service
const services = await api.getServices({name: "OpenFlexure"});
// get the first service
const ofm = services[0];
// snap an image
const start = await ofm.getXYZPosition();
console.log(`Starting position: ${start}`);
// move the Z axis up and down
await ofm.setPosition(start[2] + 100);
console.log(`Moved Z to ${await ofm.getPosition()}`);
await ofm.setPosition(start[2]);
console.log(`Moved Z to ${await ofm.getPosition()}`);
await ofm.fullFocus();
console.log("Ran a full autofocus");
}
}
api.export(new ImJoyPlugin())
</script>