Add motion tracking and calibration features
This commit is contained in:
1 parent
4aa369ca73
commit
aab61a2b7b
13 files changed
+735
-169
No files matched your search
+2
-2
@@ -16,7 +16,7 @@ const FLAG_AUTO_RECAL_ENABLED = 0x04;
|
||||
const FLAG_ALL_DEFAULT = FLAG_TAP_ENABLED | FLAG_TEMP_COMP_ENABLED | FLAG_AUTO_RECAL_ENABLED;
|
||||
|
||||
// Local shadow of the current config (kept in sync with device)
|
||||
const config = { sensitivity:600, deadZone:0.06, accelStrength:0.08, curve:0, axisFlip:0, chargeMode:0,
|
||||
const config = { sensitivity:600, deadZone:0.02, accelStrength:0.08, curve:0, axisFlip:0, chargeMode:0,
|
||||
tapThreshold:12, tapAction:0, tapKey:0, tapMod:0, tapFreezeEnabled:1, jerkThreshold:2000,
|
||||
featureFlags:FLAG_ALL_DEFAULT,
|
||||
};
|
||||
@@ -601,7 +601,7 @@ function updateDisplay(key, val) {
|
||||
deadZone: ['valDeadZone', v=>parseFloat(v).toFixed(3)],
|
||||
accel: ['valAccel', v=>parseFloat(v).toFixed(2)],
|
||||
jerkThreshold:['valJerkThreshold',v=>parseFloat(v).toFixed(0)],
|
||||
tapThreshold: ['valTapThreshold', v=>(parseFloat(v)*62.5).toFixed(0)+' mg'],
|
||||
tapThreshold: ['valTapThreshold', v=>(parseFloat(v)*125).toFixed(0)+' mg'],
|
||||
};
|
||||
const [id,fmt] = map[key];
|
||||
document.getElementById(id).textContent = fmt(val);
|
||||
|
||||
+4
-4
@@ -51,10 +51,10 @@
|
||||
<div class="param-value" id="valSensitivity">600</div>
|
||||
</div>
|
||||
<div class="param">
|
||||
<div><div class="param-label">Dead Zone</div><div class="param-desc">Noise floor (rad/s) - raise to reduce drift</div></div>
|
||||
<input type="range" id="slDeadZone" min="0.005" max="0.2" step="0.005" value="0.06"
|
||||
<div><div class="param-label">Dead Zone</div><div class="param-desc">Soft dead zone (rad/s) - raise to steady the cursor while holding still</div></div>
|
||||
<input type="range" id="slDeadZone" min="0" max="0.1" step="0.001" value="0.02"
|
||||
oninput="updateDisplay('deadZone',this.value)" onchange="writeConfigBlob()">
|
||||
<div class="param-value" id="valDeadZone">0.060</div>
|
||||
<div class="param-value" id="valDeadZone">0.020</div>
|
||||
</div>
|
||||
<div class="param">
|
||||
<div><div class="param-label">Accel Strength</div><div class="param-desc">Pointer acceleration multiplier</div></div>
|
||||
@@ -126,7 +126,7 @@
|
||||
</div>
|
||||
<div class="flip-row" style="border-bottom:none">
|
||||
<div class="flip-label">Auto Recalibration</div>
|
||||
<div class="param-desc" style="flex:1;font-size:9px;color:var(--label)">Recalibrate gyro after long idle period</div>
|
||||
<div class="param-desc" style="flex:1;font-size:9px;color:var(--label)">Re-estimate gyro bias whenever the remote is at rest</div>
|
||||
<label class="toggle"><input type="checkbox" id="capAutoRecal" onchange="writeConfigBlob()" disabled><div class="toggle-track"></div><div class="toggle-thumb"></div></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user