import debug from "debug";
import { css, html, LitElement } from "lit";
import { customElement, query, state } from "lit/decorators.js";
import { CollectorClient } from "../collector/CollectorClient";
import { getTopGraph } from "../RdfdbSyncedGraph";
import { SyncedGraph } from "../SyncedGraph";
import { FindSafeExposure } from "./FindSafeExposure";
import { Light9Camera } from "./Light9Camera";
import { XyPlot } from "./XyPlot";
export { RdfdbSyncedGraph } from "../RdfdbSyncedGraph";
export { Light9Camera } from "./Light9Camera";
export { XyPlot } from "./XyPlot";
debug.enable("*");
const log = debug("calibrate");
export async function sleep(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
@customElement("light9-calibrate")
export class Light9Calibrate extends LitElement {
graph!: SyncedGraph;
static styles = [
css`
button {
min-height: 3em;
min-width: 10em;
}
`,
];
collector: CollectorClient = new CollectorClient("calibrate");
@query("light9-camera", true) cam?: Light9Camera;
@query("xy-plot", true) plot?: XyPlot;
@state() device: string;
constructor() {
super();
this.device = "http://light9.bigasterisk.com/theater/vet/device/parR3";
getTopGraph().then((g) => {
this.graph = g;
});
}
render() {
return html`
Device to calibrate: [ ${this.device} ]