changeset 2420:d5750b2aaa9e

minor cam edits
author drewp@bigasterisk.com
date Tue, 21 May 2024 14:50:01 -0700
parents e3af0ac507c8
children ac55319a2eac
files web/calibrate/FindSafeExposure.ts web/calibrate/Light9Calibrate.ts web/calibrate/Light9Camera.ts
diffstat 3 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/web/calibrate/FindSafeExposure.ts	Tue May 21 14:08:17 2024 -0700
+++ b/web/calibrate/FindSafeExposure.ts	Tue May 21 14:50:01 2024 -0700
@@ -31,6 +31,7 @@
         break;
       }
     }
+    return this.expo;
   }
   
   step(currentOverexposed: number) {
--- a/web/calibrate/Light9Calibrate.ts	Tue May 21 14:08:17 2024 -0700
+++ b/web/calibrate/Light9Calibrate.ts	Tue May 21 14:50:01 2024 -0700
@@ -81,7 +81,7 @@
   async findSafeExposure(ev: MouseEvent) {
     await this.withButtonSpinner(ev, async () => {
       const algo = new FindSafeExposure(this.cam!, this.plot!);
-      await algo.run();
+      const expo = await algo.run();
     });
   }
   async setToZero(ev: MouseEvent) {
--- a/web/calibrate/Light9Camera.ts	Tue May 21 14:08:17 2024 -0700
+++ b/web/calibrate/Light9Camera.ts	Tue May 21 14:50:01 2024 -0700
@@ -85,12 +85,14 @@
     await t.applyConstraints({
       brightness: 0,
       contrast: 32,
-      colorTemperature: 6600,
+      colorTemperature: 4600,
       exposureMode: "manual",
       exposureTime: 250,
       whiteBalanceMode: "manual",
-      focusMode: "manual",
-      focusDistance: 235,
+      // this could stop focus from moving around, but it also makes my cam
+      // click on every page reload
+      //   focusMode: "manual",
+      //   focusDistance: 235,
     } as MediaTrackConstraints);
 
     this.vtrack = t;
@@ -155,6 +157,7 @@
   ];
 
   boring = [
+    "autoGainControl",
     "aspectRatio",
     "backgroundBlur",
     "channelCount",
@@ -201,7 +204,7 @@
     </table>`;
   }
 
-  private renderRow(key: string, rows: any[]) {
+  private renderRow(key: string, out: TemplateResult<1>[]) {
     let valueDisplay = "";
     if (this.videoSettings[key] !== undefined) {
       valueDisplay = JSON.stringify(this.videoSettings[key]);
@@ -213,7 +216,7 @@
         <input type="range" min="${conf.min}" max="${conf.max}" value="${this.videoSettings[key]}" data-param="${key}" @input=${this.setFromSlider} />
       `;
     }
-    rows.push(
+    out.push(
       html`<tr>
         <td>${key}</td>
         <td>${valueDisplay}</td>