fix: slicecam guiding flag reads wrong field#456
Merged
Conversation
(the target can be acquired but not necessarily guiding)
prkrtg
approved these changes
Jun 24, 2026
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.
Problem:
"Put on slit" intermittently fails when acam guiding is off (telescope doesn't move and command silently does nothing).
Cause:
If acam is not guiding then slicecam can send offsets directly to the TCS. But if it is guiding, then it changes acam's goal.
I was reading the
is_acam_guidingstate by looking at the message keyKey::Acamd::IS_ACQUIREDbut that is true (and stays true) after an acquisition, whether or not we are currently guiding. So it could read "guiding" when actually not guiding. The intermittent part is the occasional acquired-but-not-guiding window.Fix:
populate the flag from
Key::Acamd::ACQUIRE_MODEwhich contains {standbyacquireguiding}This replaces PR #450. That applied a band-aid which masked the true problem.