jetpackjules commited on
Commit
9646b45
Β·
verified Β·
1 Parent(s): 17ef0e5

Tune controls for forward-facing robot camera

Browse files
Files changed (2) hide show
  1. index.html +7 -7
  2. main.js +2 -2
index.html CHANGED
@@ -84,13 +84,13 @@
84
  <span id="streamingStatus">Starting Reachy camera…</span>
85
  </div>
86
  <div class="robot-name" id="robotName"></div>
87
- <label class="toggle">
88
- <input type="checkbox" id="toggleMaster" checked />
89
- <span>Robot follows my face</span>
90
- </label>
91
- <label class="toggle">
92
- <input type="checkbox" id="toggleMirror" checked />
93
- <span>Mirror mode</span>
94
  </label>
95
  <button class="btn btn-secondary" id="btnReset">Reset tuner</button>
96
  <button class="btn btn-secondary" id="btnSnapshot">Save snapshot</button>
 
84
  <span id="streamingStatus">Starting Reachy camera…</span>
85
  </div>
86
  <div class="robot-name" id="robotName"></div>
87
+ <label class="toggle">
88
+ <input type="checkbox" id="toggleMaster" checked />
89
+ <span>Robot follows the face it sees</span>
90
+ </label>
91
+ <label class="toggle">
92
+ <input type="checkbox" id="toggleMirror" />
93
+ <span>Mirror view + yaw</span>
94
  </label>
95
  <button class="btn btn-secondary" id="btnReset">Reset tuner</button>
96
  <button class="btn btn-secondary" id="btnSnapshot">Save snapshot</button>
main.js CHANGED
@@ -397,7 +397,7 @@ const FEATURE_GROUPS = [
397
  const ALL_FEATURES = FEATURE_GROUPS.flatMap((g) => g.features);
398
 
399
  function isMaster() { return $("toggleMaster")?.checked ?? false; }
400
- function isMirror() { return $("toggleMirror")?.checked ?? true; }
401
 
402
  // ─── DOM helpers ───────────────────────────────────────────
403
  const $ = (id) => document.getElementById(id);
@@ -1336,7 +1336,7 @@ onDomReady(() => {
1336
  config.headAmp = fresh.headAmp;
1337
  config.headRules = fresh.headRules;
1338
  config.rules = fresh.rules;
1339
- $("toggleMirror").checked = true;
1340
  applyMirrorClass();
1341
  renderTuner();
1342
  });
 
397
  const ALL_FEATURES = FEATURE_GROUPS.flatMap((g) => g.features);
398
 
399
  function isMaster() { return $("toggleMaster")?.checked ?? false; }
400
+ function isMirror() { return $("toggleMirror")?.checked ?? false; }
401
 
402
  // ─── DOM helpers ───────────────────────────────────────────
403
  const $ = (id) => document.getElementById(id);
 
1336
  config.headAmp = fresh.headAmp;
1337
  config.headRules = fresh.headRules;
1338
  config.rules = fresh.rules;
1339
+ $("toggleMirror").checked = false;
1340
  applyMirrorClass();
1341
  renderTuner();
1342
  });