working version

This commit is contained in:
Ayzen
2026-05-18 17:27:00 +03:00
parent 907dbf29ce
commit 0da8b1283c
23 changed files with 1479 additions and 133 deletions
@@ -93,6 +93,14 @@ class MultiDeviceVnaController:
if not self._reference_configuration_applied:
self._configure_reference_clocks()
# Even when the device-side configuration matches and we skip reconfiguration,
# the host-side packet queue has been accumulating datapoints from cycles that
# ran between calls. Draining here guarantees the next collect_running_sweep_cycles
# returns a freshly-arriving cycle (the cycle tracker waits for point_index==0).
# Without this drain, callers would receive whichever stale cycle happened to be
# at the head of the queue — e.g. data from before a manual cable swap.
self._drain_all_received_packets()
if (
self._sweep_is_running
and self._last_applied_sweep_configuration == sweep_configuration
@@ -104,7 +112,6 @@ class MultiDeviceVnaController:
self._send_idle_to_all_devices()
time.sleep(self._reconfigure_delay_s)
self._drain_all_received_packets()
self._configure_sweep_on_all_devices(
sweep_configuration,
master_stimulus_ports=stimulus_ports,