Skip to content

Commit 144eca2

Browse files
authored
Merge pull request #179 from aarmea-butterfly/make-callback-optional-again
Make callback in runBlock optional
2 parents 30bdafb + d28e722 commit 144eca2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

picoscope/ps4000a.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ def blockReady(function):
7777
void * pParameter
7878
)
7979
"""
80+
if function is None:
81+
return None
82+
8083
callback = CFUNCTYPE(c_void_p, c_int16, c_uint32, c_void_p)
8184
return callback(function)
8285

picoscope/ps5000a.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ def blockReady(function):
7171
void * pParameter
7272
)
7373
"""
74+
if function is None:
75+
return None
76+
7477
callback = CFUNCTYPE(c_void_p, c_int16, c_uint32, c_void_p)
7578
return callback(function)
7679

0 commit comments

Comments
 (0)