From 108abea6f6ceac044dc8b2b526c139e4589bd1f7 Mon Sep 17 00:00:00 2001 From: Daniel Montanari Date: Tue, 24 Feb 2026 13:29:49 +1100 Subject: [PATCH 1/2] force reset of pins --- src/fixate/_switching.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/fixate/_switching.py b/src/fixate/_switching.py index f9209d7e..9e45396c 100644 --- a/src/fixate/_switching.py +++ b/src/fixate/_switching.py @@ -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 @@ -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: """ @@ -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: From 43d44fdf8c1c7e8cb7097042ce00ef8bb1e9c60a Mon Sep 17 00:00:00 2001 From: Daniel Montanari Date: Tue, 24 Feb 2026 13:44:58 +1100 Subject: [PATCH 2/2] bump release notes --- docs/release-notes.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes.rst b/docs/release-notes.rst index 1d4a4ac4..979560ba 100644 --- a/docs/release-notes.rst +++ b/docs/release-notes.rst @@ -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