working version
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user