Commit c5754800 authored by Matias Guijarro's avatar Matias Guijarro Committed by Sebastien Petitdemange
Browse files

acquisition/counter.py: synchro fix

parent 2dc8bec0
...@@ -58,7 +58,6 @@ class CounterAcqDevice(AcquisitionDevice): ...@@ -58,7 +58,6 @@ class CounterAcqDevice(AcquisitionDevice):
self._ready_event.clear() self._ready_event.clear()
def reading(self): def reading(self):
while self._nb_acq_points < self.npoints: while self._nb_acq_points < self.npoints:
#trigger wait #trigger wait
self._event.wait() self._event.wait()
...@@ -85,11 +84,11 @@ class CounterAcqDevice(AcquisitionDevice): ...@@ -85,11 +84,11 @@ class CounterAcqDevice(AcquisitionDevice):
break break
sleep(0) # Be able to kill the task sleep(0) # Be able to kill the task
self._ready_flag = True
self._ready_event.set()
self._nb_acq_points += 1 self._nb_acq_points += 1
data = numpy.zeros((1,),dtype=numpy.double) data = numpy.zeros((1,),dtype=numpy.double)
data[0] = acc_value / nb_read data[0] = acc_value / nb_read
dispatcher.send("new_data",self, dispatcher.send("new_data",self,
{"channel_data": {self.name:data}}) {"channel_data": {self.name:data}})
self._ready_flag = True
self._ready_event.set()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment