Skip to content

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.

@adamkglaser adamkglaser requested a review from Poofjunior June 11, 2024 18:36
@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.

3 participants