Compare commits

...
1 Commits
Author SHA1 Message Date
MightyPork d470ff62bb support python 3.7's new keywords 2018-09-22 21:43:17 +02:00
+3 -3
View File
@@ -361,7 +361,7 @@ class ADC(gex.Unit):
def capture_in_progress(self): def capture_in_progress(self):
return self._stream_running or self._trig_buf is not None return self._stream_running or self._trig_buf is not None
def capture(self, count, timeout=None, async=False, lst=None): def capture(self, count, timeout=None, asynch=False, lst=None):
""" """
Start a block capture. Start a block capture.
This is similar to a forced trigger, but has custom size and doesn't include any pre-trigger. This is similar to a forced trigger, but has custom size and doesn't include any pre-trigger.
@@ -400,7 +400,7 @@ class ADC(gex.Unit):
if frame.type == EVT_CAPT_DONE: if frame.type == EVT_CAPT_DONE:
self._bcap_done = True self._bcap_done = True
if async: if asynch:
lst(self._parse_buffer(buffer)) lst(self._parse_buffer(buffer))
self._stream_running = False self._stream_running = False
return TF.CLOSE return TF.CLOSE
@@ -409,7 +409,7 @@ class ADC(gex.Unit):
self._query_async(cmd=CMD_BLOCK_CAPTURE, pld=pb.close(), callback=_lst) self._query_async(cmd=CMD_BLOCK_CAPTURE, pld=pb.close(), callback=_lst)
if not async: if not asynch:
# wait with a timeout # wait with a timeout
self.client.transport.poll(timeout, lambda: self._bcap_done == True) self.client.transport.poll(timeout, lambda: self._bcap_done == True)