Skip to content

Commit

Permalink
pxi6733: fix verification of the number of buffered sample values
Browse files Browse the repository at this point in the history
fallen committed Aug 14, 2015
1 parent 1ce8bbe commit 966d0ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions artiq/devices/pxi6733/driver.py
Original file line number Diff line number Diff line change
@@ -115,9 +115,9 @@ def load_sample_values(self, sampling_freq, values):
ret = t.WriteAnalogF64(samps_per_channel, False, 0,
self.daq.DAQmx_Val_GroupByChannel, values,
byref(num_samps_written), None)
if num_samps_written.value != nb_values:
raise IOError("Error: only {} sample values were written"
.format(num_samps_written.value))
if num_samps_written.value != samps_per_channel:
raise IOError("Error: only {} sample values per channel were"
"written".format(num_samps_written.value))
if ret:
raise IOError("Error while writing samples to the channel buffer")

0 comments on commit 966d0ee

Please sign in to comment.