forked from M-Labs/artiq
sampler: fix channel gain retrieval
This commit is contained in:
parent
12d699f2a8
commit
82c4f0eed4
|
@ -133,6 +133,6 @@ class Sampler:
|
||||||
adc_data = [0]*n
|
adc_data = [0]*n
|
||||||
self.sample_mu(adc_data)
|
self.sample_mu(adc_data)
|
||||||
for i in range(n):
|
for i in range(n):
|
||||||
channel = 8 - len(data)
|
channel = i + 8 - len(data)
|
||||||
gain = (self.gains >> (channel*2)) & 0b11
|
gain = (self.gains >> (channel*2)) & 0b11
|
||||||
data[i] = adc_mu_to_volt(adc_data[i], gain, self.v_ref)
|
data[i] = adc_mu_to_volt(adc_data[i], gain, self.v_ref)
|
||||||
|
|
Loading…
Reference in New Issue