Don't reset camera zoom on gyro calibration (#94)#96
Merged
Conversation
startCalibration() called overlay.setCameraPreset(), which snaps the camera position (both angle AND zoom distance) back to a preset. So every recalibrate (L3+R3) stomped the user's manual zoom/pan, making it hard to use the full window. Calibration only needs to re-zero gyro bias + orientation (resetGyroState); it has no business moving the camera — and finishCalibration already doesn't. Removed the setCameraPreset call. The initial view is still set once at overlay init, and the preset selector still works on demand. Closes #94 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HwZjBdVgWqxqCoKkXsZnr4
🔎 PR #96 preview — torn downThis PR is closed; its web preview and desktop prerelease have been removed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #94.
startCalibration()calledoverlay.setCameraPreset(selectedCameraPreset), which sets the camera position — encoding both the view angle and the zoom distance. So every recalibration (L3+R3 combo) snapped the camera back to a preset, wiping out the user's manual zoom/pan and making it hard to use the whole window.Calibration should only re-zero gyro bias + orientation (
resetGyroState()); it has no reason to move the camera — andfinishCalibration()already doesn't touch it. Removed the straysetCameraPresetcall.Changes
apps/overlay/src/js/app.js— dropoverlay.setCameraPreset(...)fromstartCalibration()(replaced with a comment explaining why calibration must not touch the camera).Preserved behavior
app.js:590).app.js:2251-2270).🤖 Generated with Claude Code