MCA/Autof scan stuck after last point
When doing autof scans with an MCA, with soft triggers, the number of points is larger than the number of points acquired during the scan, so the stop occurs before that number of points is reached.
The reading task is expecting a StopIteration when stop is called (or the last point is taken, this still works), but commit 263efb96 seems to have had a side effect that changed that behaviour.
(There seems to be also a problem (buffer overrun) when using hardware trig)
Quick fix that needs validation: putting StopIteration into the queue when stop is called when soft trig is used.
bliss.scanning.acquisition.mca.McaAcquisitionSlave:
def stop(self):
"""Stop the acquistion."""
log_debug(self, "stop()")
try:
self.device.stop_acquisition()
if not self.soft_trigger_mode:
self.device.wait_hardware_reading()
else:
self._pending_datas.put(StopIteration)
finally:
event.disconnect(self.device, "data", self._data_rx)
Edited by Damien Naudet