Skip to content

Commit

Permalink
Merge pull request #179 from aarmea-butterfly/make-callback-optional-…
Browse files Browse the repository at this point in the history
…again

Make callback in runBlock optional
  • Loading branch information
hmaarrfk authored Dec 10, 2021
2 parents 30bdafb + d28e722 commit 144eca2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions picoscope/ps4000a.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ def blockReady(function):
void * pParameter
)
"""
if function is None:
return None

callback = CFUNCTYPE(c_void_p, c_int16, c_uint32, c_void_p)
return callback(function)

Expand Down
3 changes: 3 additions & 0 deletions picoscope/ps5000a.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def blockReady(function):
void * pParameter
)
"""
if function is None:
return None

callback = CFUNCTYPE(c_void_p, c_int16, c_uint32, c_void_p)
return callback(function)

Expand Down

0 comments on commit 144eca2

Please sign in to comment.