Skip to content

sequencerd, tcsd: the TCS ontarget signal satisfies the ontarget wait - #510

Open
cfremling wants to merge 1 commit into
mainfrom
feat/sequencer-tcs-ontarget
Open

cfremling wants to merge 1 commit into
mainfrom
feat/sequencer-tcs-ontarget

Conversation

@cfremling

Copy link
Copy Markdown
Collaborator

?ONTARGET was unusable through tcsd, which translates every non-whitelisted reply as a status code: the flag is the reply, so 0 collided with success and 1 became tcs_undefined ERROR. tcsd now passes it through verbatim.

sequencerd (TCS_AUTO_ONTARGET=yes): during move_to_target's wait for the operator's ontarget, a watcher sends ontarget itself when two consecutive 1 Hz reads show ?ONTARGET=1, motion tracking, the telescope within TCS_AUTO_ONTARGET_SEP=5.0" of the commanded position, and the cass ring within TCS_AUTO_ONTARGET_CASS=0.05 deg of the RINGGO angle. If only the ring is missing for 20 s, one warning asks the operator to press ontarget. The operator's press works unchanged; whichever comes first wins. Each move retires earlier watchers, so a watcher from a previous move can never satisfy a new one.

Rebuild (sequencerd.cfg is regenerated), restart sequencerd and tcsd. Check: "TCS reports on-target (?ONTARGET=1, tracking, ...) -- sending ontarget" about 1–2 s after each slew ends.

Tested on sky using branch cf/summit-20261030 on 2026-11-03: the automatic signal sent ontarget for 25 slews. On the main robot nights the operator's press came a median 5 s (mean 12 s) after the telescope was tracking.

Jira: PAL-144.

🤖 Generated with Claude Code

?ONTARGET was invisible through tcsd because send_command translates
every non-whitelisted reply as a status code: the flag IS the reply, so
0 collided with TCS_SUCCESS ('success') and 1 fell through to
'tcs_undefined' ERROR. Whitelist it for verbatim passthrough.

sequencerd: config TCS_AUTO_ONTARGET (default yes) spawns a watcher for
exactly the lifetime of move_to_target's TCSOP wait. It calls
ontarget() -- the operator's own path -- when, on two consecutive 1 Hz
reads: ?ONTARGET==1 AND motion==tracking AND |telescope-target| <
TCS_AUTO_ONTARGET_SEP arcsec AND |TCS cass angle - RINGGO angle| <
TCS_AUTO_ONTARGET_CASS (0.05 deg). All four are required: shadow data
(UT 2026-08-25, 64 slews) shows the flag is position-agnostic, the
separation cannot see sub-threshold hops, and motion says nothing
about settle; ACAM's goal is computed from the cass angle at the
acquire, about 8.5" per degree of ring still to turn. When everything
but the ring has held for 20 s, one warning tells the operator to press
ontarget once the ring is in place. The operator's press is unchanged;
whichever arrives first wins.

Each move retires every earlier watcher (a launch generation) and
clears the ontarget flag before the COORDS, and a watcher acknowledges
under the same lock, so one still sleeping from an earlier move can
never satisfy a new one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-05T18:56:41.856051Z
We couldn’t complete this review. Comment @codex review to try again.
518aeb0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants