Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding ENC_INT device code #59

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

adding ENC_INT device code #59

wants to merge 2 commits into from

Conversation

adamkglaser
Copy link
Collaborator

Adding ENC_INT device code for TTL IN mode, has same X=1 value as MOVE_NEXT_ABS position https://asiimaging.com/docs/scan_module.

@Poofjunior
Copy link
Collaborator

Hmm, I think the ASIImaging documentation for this functionality has been updated--possibly along with a firmware change also. As written we now have an enum value 1 used in 2 places, which doesn't make sense.

MOVE_TO_NEXT_ABS_POSITION = 1
ENC_INT = 1

Let's figure out why both of these are 1 before merging.

This looks like a related issue to: #58

@Poofjunior
Copy link
Collaborator

Ok, looking at this more closely, I think we want to have two different enum classes rather than try to fold overlapping options into one enum. Something like:

class IN0_INT_TTLIn0Mode(Enum):
    OFF = 0
    MOVE_TO_NEXT_ABS_POSITION = 1
    REPEAT_LAST_REL_MOVE = 2
    # etc...

class ENC_INT_TTLIn0Mode(Enum):
    ENC_INT = 1

That's because the options are different depending on what firmware modules are available. (I'm referencing the scan_module wiki page.)

It looks like SCAN_MODULE + IN0_TTL module would enable the first group of enums, and SCAN_MODULE + ENC_INT module would enable the other group of enums. We would then do checks depending on what modules were loaded.

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