Stage move API now works
The test plugin seems to have problems calling setPosition more than once. We don't understand this... Co-authored-by: Kaspar Emanuel <kaspar@monostable.co.uk>
This commit is contained in:
parent
757ee216cf
commit
297908fbc8
4 changed files with 298 additions and 39 deletions
|
|
@ -0,0 +1,43 @@
|
|||
<docs>
|
||||
[TODO: write documentation for this plugin.]
|
||||
</docs>
|
||||
|
||||
<config lang="json">
|
||||
{
|
||||
"name": "OpenFlexureSnapImageTemplate",
|
||||
"type": "web-worker",
|
||||
"tags": [],
|
||||
"ui": "",
|
||||
"version": "0.1.0",
|
||||
"cover": "",
|
||||
"description": "[TODO: describe this plugin with one sentence.]",
|
||||
"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
|
||||
await ofm.snapImage();
|
||||
console.log("snapped an image");
|
||||
}
|
||||
}
|
||||
|
||||
api.export(new ImJoyPlugin())
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue