Skip to content

Commit 517b00d

Browse files
author
neil-hamilton
authored
Merge pull request picotech#42 from alducci/patch-1
fix check no_of_samples
2 parents 140dc0a + 5381c62 commit 517b00d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

picosdk/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def capture_block(self, timebase_options, channel_configs=()):
201201
# always force the number of memory segments on the device to 1 before computing timebases for a one-off
202202
# block capture.
203203
max_samples_possible = self.driver.memory_segments(self, USE_SEGMENT_ID+1)
204-
if timebase_options.no_of_samples is not None and timebase_options.no_of_samples > max_samples_possible:
204+
if timebase_options.no_of_samples is not None and timebase_options.no_of_samples > max_samples_possible.value:
205205
raise NoValidTimebaseForOptionsError()
206206
except DeviceCannotSegmentMemoryError:
207207
pass

0 commit comments

Comments
 (0)