2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

pxi6733: fix type issue

This commit is contained in:
Yann Sionneau 2015-06-08 17:56:44 +02:00
parent d66117ed99
commit 6c094b500d

View File

@ -88,15 +88,15 @@ class DAQmx:
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,