Add acquisition automation modes and acqmode command#391
Add acquisition automation modes and acqmode command#391
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a89f02d2d3
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| auto wait_for_guiding = [&]() -> long { | ||
| ScopedState wait_state( wait_state_manager, Sequencer::SEQ_WAIT_ACQUIRE ); | ||
| this->async.enqueue_and_log( function, "NOTICE: waiting for ACAM guiding" ); |
There was a problem hiding this comment.
Avoid clearing SEQ_WAIT_ACQUIRE in wait_for_guiding
In auto modes 2/3, wait_for_guiding creates a ScopedState for SEQ_WAIT_ACQUIRE, which clears that bit as soon as the helper returns (on guiding, timeout, or error). The acquisition thread already sets the same SEQ_WAIT_ACQUIRE bit in dothread_acquisition, so this new scoped state can clear the bit while acquisition is still running. Any clients or logic watching the wait-state (telemetry/UI or other waits) will see acquisition complete early and may proceed to expose even though acquisition is still active. Consider removing this ScopedState or using a separate state/refcounted mechanism for the “waiting for guiding” phase.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Will add a new state to wait for inside the mode loops to not mess with the overall acquisition state
There was a problem hiding this comment.
- Added SEQ_WAIT_GUIDE instead of SEQ_WAIT_ACQUIRE while waiting
for guiding. - Added ACQ_FINE_TUNE_XTERM so fine-tune can run in its own xterm when
enabled so it can be properly monitored. - Fine-tune process is now launched in its own process group and is terminated on seq abort . works even if seq abort sent when ngps_acq in progress
seq acqmode 1,2,3 TESTED with NGPS simulator mode
Commit: a20b509
This adds 3 mode settings for acquisition with various levels of automation.
mode 1 is identical to current (legacy acquisition)
mode 2 waits for seq continue between each step (goes through acquisition, fine tuning using scam, offset, expose)
mode 3 is full auto
the fine tuning step uses ngps_acq (standalone binary) (just one compiled .c code, which could also be directly integrated in the cpp code)
needs comprehensive on-sky testing before pull approved