Daytime (manual) alignment screen (#455)#456
Open
brickbots wants to merge 2 commits into
Open
Conversation
Adds a no-solve alignment path for daylight setup. The user points the scope at a distant object centred in the eyepiece, finds where the rigidly-mounted camera sees it, and marks that pixel by eye -- writing it straight to `target_pixel`, the same destination the solve-based `UIAlign`/`align_on_radec` reaches. New `UIAlignDaytime` (ui/align_daytime.py), placed as "Align (Day)" right after "Align" in the Start menu. Like the solve-based screen it starts inactive: SQUARE begins, then up to three rounds of 2x2 quadrant picks (keypad corners 7/9/1/3) narrow the marker, the first arrow press switches to one-pixel fine adjustment, SQUARE saves (writes target_pixel as (Y,X) in 512 native space) and 0 cancels. The long-press marking menu offers "Center" and "Exp Auto". Supporting changes: - ui/camera_render.py: shared crop/zoom/resize helper factored out of UIPreview (Focus screen behaviour unchanged); daytime align renders the frame full-brightness grayscale (no red night-vision mask). - camera_interface.py / camera_pi.py: new `set_exp:native` command drives the camera's native auto-exposure for daylight, with a fixed short-exposure fallback on backends without it (debug/none). set_camera_config now clears AeEnable on Pi so manual exposure (exp_up/exp_dn/set_exp:<us>) always overrides native AE. Exposure is saved on entry and restored on exit (active/inactive). - docs: quick-start "Daytime alignment" section + screenshots; CONTEXT.md glossary terms (Daytime vs Solve-based alignment; keypad layout) from the design session. - i18n: new UI strings wrapped and the Babel extract/update/compile pipeline run (the bulk of the .po diff is location-comment refresh -- the catalogs had not been re-extracted since 2026-05-24). - tests: unit coverage for quadrant math, the display->native (Y,X) conversion at 128/176, and the camera-render helper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the synthetic debug-camera screenshots with real daytime captures (rooftop/floodlight scene), upscaled 2x crisp with no amber/brightness recolor so they stay true to the white daytime view. The quadrant step now shows the region narrowing across multiple rounds: the full 2x2 grid, then two further picks side by side, plus a fine-mode crosshair shot. Text adjusted to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Closes #455.
Adds a no-solve alignment path for daylight setup. The user points the scope at a distant object centred in the eyepiece, finds where the rigidly-mounted camera sees it, and marks that pixel by eye — writing it straight to
target_pixel, the same destination the solve-basedUIAlign/align_on_radecreaches (shared_state.set_target_pixel()+config["target_pixel"], stored as(Y, X)in the 512px native frame).What's here
UIAlignDaytime(ui/align_daytime.py), wired as "Align (Day)" right after "Align" in the Start menu (stateful,preload). Like the solve-based screen it starts inactive — SQUARE begins the process. Then:7TL,9TR,1BL,3BR — TKL layout), each round shrinking the region to the legibility floor (~16px cells on the 128 panel, ~22px on 176).+/-override exposure; long-press marking menu offers Center and Exp Auto.Supporting changes
ui/camera_render.py— shared crop/zoom/resize helper factored out ofUIPreview(Focus screen behaviour preserved, pixel-identical). Daytime renders the frame full-brightness grayscale (no red night-vision mask — dark adaptation is irrelevant in daylight).camera_interface.py/camera_pi.py— newset_exp:nativedrives picamera2's native auto-exposure for daylight, with a fixed short-exposure fallback on backends without it (debug/none).set_camera_confignow clearsAeEnableon Pi so manual exposure (exp_up/exp_dn/set_exp:<us>) always overrides native AE. Exposure is saved on entry and restored on exit (active/inactive)._(); Babel extract/update/compile run.tests/test_align_daytime.py: quadrant subdivision, display→native(Y, X)conversion at 128/176, and the camera-render helper.Verification
ruff checkclean;mypyclean on the new files (not mypy-ignored).target_pixel = (Y, X)to shared_state + config and restores the prior exposure on exit.Reviewer notes
.podiff is location-comment refresh — the catalogs hadn't been re-extracted since 2026-05-24, so running the documentednox -s babelpipeline updated#:line references across the whole file. The only content additions are the daytime-align UI strings (left as Babel's#, fuzzy→ English fallback for translators to review).ruff formatdrift inmenu_structure.py(IMU-settings comments, ~line 1090) left untouched to keep this diff focused;nox -s formatauto-fixes it.🤖 Generated with Claude Code