Jig mux alternate implementation#184
Merged
clint-lawrence merged 42 commits intoPyFixate:masterfrom Jun 20, 2024
Merged
Conversation
clint-lawrence
commented
Jun 3, 2024
- Run black - Bump mypy version - Drop 3.7 and add 3.12 to CI test runs - Fix some 3.7 specific imports.
jcollins1983
reviewed
Jun 6, 2024
Collaborator
Author
|
I deleted a few comment and moved the content to #187 |
jcollins1983
reviewed
Jun 9, 2024
Collaborator
jcollins1983
left a comment
There was a problem hiding this comment.
Just a couple of questions here and there.
clint-lawrence
commented
Jun 11, 2024
Draft
Still not sure about this...
Collaborator
Author
|
O.K. this is no longer draft... I'm still not 100% on the address handler stuff. But my concerns are really how that ties with #182, so I think I need to get this merged and then see where that PR ends up. If we end up reworking the address handlers in that PR that is O.K. I've also created a handful of smaller issues. Once this PR is reviewed and merged we can decide if we want to do any of that work before making a new release. |
jcollins1983
approved these changes
Jun 19, 2024
Collaborator
jcollins1983
left a comment
There was a problem hiding this comment.
I'm happy with where things are on this.
This silences a warning that were importing an private module from fixate.core in the top level __init__.py. So partly this is just to silence PyCharm, but it is a resonable change in general.
daniel-montanari
approved these changes
Jun 20, 2024
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.
This introduces a new implementation of the jig switching support code. The primary motivation/goals:
This implementation make the "pin" concept the primary point of coupling between the AddressHandlers and VirtualMuxs. Then the JigDriver is being revised to improve type hinting of the jig driver object and also decouple instantiation at runtime from JigDriver subclass definition. In addition, I'm working towards the new code have complete (or near complete) type annotations.
While these changes are trying to avoid the need to change existing test scripts, it won't be possible to implement this in a completely backwards compatible way. So this will be introduced as a parallel implementation. Existing scripts will continue to run. New and updated scripts will import from a different submodule and be able to take advantage of the improved implementation. In time, the current jig_mapping implementation will be removed.
Once this work is done, it will be possible to move software with the related DriverManager change https://github.com/PyFixate/Fixate/pull/182/files
switch_through_all_signals. Instead, create a method that returns all signals on a mux.iterate_all_mux_pathsto return mux object and signal pairs inline with the change above toswitch_through_all_signalsAs a minimum, add a method to address map that ensures all pins from all virtual muxes have pin defined in an address handler. Probably call this during the JigDriver init.
VirtualAddressMap.{update_pin_by_name,update_pins_by_name, __getitem__, __setitem__}""? In the previous jig_mapping implementation, the behaviour of the empty signal was hard coded. If you defined some pins against"", I'm pretty sure that would be ignored. Should we check that the user script doesn't redefine""?MuxGroup.force_triggeror similar, that writes all the current mux states out to hardware, even if the pins haven't changed?MuxGroup.trigger()orVirtualAddressMap.trigger()that processes any pin changes inVirtualAddressMap._pending_updates(Issues created Add aforce_triggermethod to the jig driver #189 and Add aJigDriver.trigger()method #190)open()method to address handlers that Jig Driver will call when it needs to. Make AddressHandlers accept a pin_list in init()RelayMatrixVirtualMuxcalledBreakBeforeMakeMux. (Issue created Rename (or alias)RelayMatrixVirtualMuxasBreakBeforeMakeMux#191)MakeBeforeBreakMuxsubclass ofVirtualMux(Issue created Rename (or alias)RelayMatrixVirtualMuxasBreakBeforeMakeMux#191)