Repository navigation
Groundwork: split camera.rs - #164
Merged
Merged
Conversation
… status The exchange with the extension unit (short and framed writes, answer polling, the sequence counter) moves to family/exchange.rs; the Tiny 2 Lite reads and writes stay as models/tiny2lite/camera.rs; the 0.13 status shape, its capability list and the remembered pose move to legacy, with state.rs. Every block is copied unchanged by scripts/groundwork/split-camera.py (anchors matched the file on rebuild as it is); items another file now uses become pub(crate). Co-Authored-By: Claude Sonnet 5.5 <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.
Fixes #162
Task 6 of the groundwork plan: splits
camera.rsby function. A pure move: no byte sent to the camera, no ioctl, no timing and no command-line output changes.What changed
git mvstate.rstolegacy/state.rsandcamera.rstomodels/tiny2lite/camera.rs.scripts/groundwork/split-camera.py(new, committed so the split can be reproduced) copies contiguous line ranges of the 0.13camera.rsinto four files. All of its line anchors matched the file onrebuildas it is; no anchor was corrected.family/exchange.rs: reply gap and attempts, pair gap, the sequence counter,struct Camera,open,short,framed,pair,query,query_to,answer.legacy/full_status.rs:CAPABILITIES,Zoom,FullStatus,Limits,LIMITS,StateView,ZoneInfo,zone_info,full_status,full_status_withand thefull_status_testsmodule.legacy/current_pose.rs:PAN_ABSOLUTE,TILT_ABSOLUTE,current_pose.models/tiny2lite/camera.rs: everything else, with its four test modules.pub(crate)onCamera.dev,Camera.seq,short,framed,pair,query,query_to,answer,PAIR_GAP,ZOOM_ABSOLUTE,current_pose.legacy/mod.rs;lib.rsgroup (pub mod error; pub mod legacy; pub use legacy::state;); onemodline each infamily/mod.rsandmodels/tiny2lite/mod.rs; thecameraimports incli.rsanddaemon.rs; two paths indocs/center-parity.md.camera.rs, the EUPL-1.2 Article 5 note.Verified (no camera, nothing opened a device)
cargo fmt --check,cargo clippy --workspace --all-targets --locked -j 3 -- -D warnings(no output),cargo test --workspace --locked -j 3: 118 + 1 + 25 + 2 + 0 passed, 0 failed, the same five result lines as on the base.byte_guardandcli_surfacepass;byte-guard.txtandcli-surface.txtare not edited.scripts/groundwork/test-names.shfor base 898579c and head,comm -3prints nothing (146 names each).scripts/groundwork/move-check.sh 898579c HEADprints exactly the 21 lines the plan lists.git diff -M --stat:{ => legacy}/state.rs | 0and{ => models/tiny2lite}/camera.rsshown as renames.rustfmt --edition 2024): the four written files equal the head's.grep -rn 'static SEQ\|const REPLY_GAP\|const REPLY_ATTEMPTS\|const PAIR_GAP\|const LOCK_WAIT' cratesgives exactly the five lines of the plan:REPLY_GAP50 ms,REPLY_ATTEMPTS20,PAIR_GAP100 ms (pub(crate)),static SEQ(all infamily/exchange.rs),LOCK_WAIT5 s (transport/uvc.rs).grep -rn 'obsbot_device::camera\|crate::camera' crates: nothing.🤖 Generated with Claude Code