Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Improvements
- Sequencer logic now handles exceptions raised on sequence abort. GUI will no longer hang when a test raises an exception during a test abort.
- Fix bug where DSOX1202G appeared to hang both the program and scope
- LCR Driver now supports instruments reporting as Keysight or Agilent. Newer models of the LCR meter report as Keysight, whereas older models report as Agilent.
- Jig switching fix to force sending the reset signal regardless of presumed jig state

*************
Version 0.6.4
Expand Down
9 changes: 6 additions & 3 deletions src/fixate/_switching.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,13 @@ def _do_pending_updates(self) -> None:
time.sleep(collated.minimum_change_time)
self._dispatch_pin_state(collated.final)

def _dispatch_pin_state(self, new_state: PinSetState) -> None:
def _dispatch_pin_state(self, new_state: PinSetState, force: bool = False) -> None:
# check all pins actually have an address handler to send to
if unknown_pins := (new_state.on | new_state.off) - self._all_pins:
raise ValueError(f"Can't switch unknown pin(s) {', '.join(unknown_pins)}.")

new_active_pins = (self._active_pins | new_state.on) - new_state.off
if new_active_pins != self._active_pins:
if (new_active_pins != self._active_pins) | force:
self._active_pins = new_active_pins
for pin_set, handler in self._handler_pin_sets:
# Note that we might send an empty set here. We need to do that
Expand All @@ -645,7 +645,7 @@ def reset(self) -> None:
possible the state of each VirtualMux and its related pins will not
be in sync.
"""
self._dispatch_pin_state(PinSetState(off=self._all_pins))
self._dispatch_pin_state(PinSetState(off=self._all_pins), force=True)

def update_input(self) -> None:
"""
Expand Down Expand Up @@ -743,6 +743,9 @@ def reset(self) -> None:
"""
Reset all VirtualMux's to the default signal "" (all pins off)
"""
# first reset the virtual map of pins to a known default state
self.virtual_map.reset()
# now reset the muxes to ensure the virtual map and muxes are synced
self.mux.reset()

def _validate(self) -> None:
Expand Down