Skip to content

Commit

Permalink
pxi6733: fix type issue
Browse files Browse the repository at this point in the history
fallen committed Jun 8, 2015
1 parent d66117e commit 6c094b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions artiq/devices/pxi6733/driver.py
Original file line number Diff line number Diff line change
@@ -88,15 +88,15 @@ def load_sample_values(self, sampling_freq, values):
min(values), max(values),
self.daq.DAQmx_Val_Volts, None)

channel_number = self.daq.int32()
t.GetTaskNumChans(byref(channel_number))
channel_number = (c_ulong*1)()
t.GetTaskNumChans(channel_number)
nb_values = len(values)
if nb_values % channel_number.value:
if nb_values % channel_number[0]:
self.daq.DAQmxClearTask(t.taskHandle)
raise ValueError("The size of the values array must be a multiple "
"of the number of channels ({})"
.format(channel_number.value))
samps_per_channel = nb_values // channel_number
.format(channel_number[0]))
samps_per_channel = nb_values // channel_number[0]

t.CfgSampClkTiming(self.clock, sampling_freq,
self.daq.DAQmx_Val_Rising,

0 comments on commit 6c094b5

Please sign in to comment.