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

Consider adding a ValveState register to set the state of all valves simultaneously. #22

Open
RoboDoig opened this issue Dec 13, 2024 · 1 comment

Comments

@RoboDoig
Copy link

Currently, there are separate state registers for odor valves and end valves (71, 72). The separation makes sense in the case where these valve sets have clearly defined roles.

In some cases however these roles can be less clear, for example where two olfactometers are being used as 1 device (to expand odor panel) one of the end valve sets may be used to switch between odor manifolds from the two respective olfactometers.

Given this use case, and also to achieve symmetry across registers/devices, it would be nice to have a ValveState register (ValveSet, ValveClear, ValveToggle, ValveState) where a user can set the state of all valves simultaneously. Should also not require too much firmware alteration since the odor valve and end valve masks have non-overlapping bits.

@bruno-f-cruz
Copy link
Member

After discussing this with @RoboDoig something else came to mind regarding analysis. If the state of the valves is simultaneously represented by two registers, it may be possible that users need to do a fair amount of post-processing to construct the full state of the board. At a bare minimum, reads to these registers should return synchronized information by accessing a common private value.

I am starting to agree with @Poofjunior on her suggestion harp-tech/protocol#30 as it would make this pattern fully composable. Probably worth discussing this again during an upcoming club.

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

No branches or pull requests

2 participants