forked from M-Labs/artiq
1
0
Fork 0

sampler: fix channel gain retrieval

This commit is contained in:
Robert Jördens 2018-03-21 14:22:13 +01:00
parent 12d699f2a8
commit 82c4f0eed4
1 changed files with 1 additions and 1 deletions

View File

@ -133,6 +133,6 @@ class Sampler:
adc_data = [0]*n
self.sample_mu(adc_data)
for i in range(n):
channel = 8 - len(data)
channel = i + 8 - len(data)
gain = (self.gains >> (channel*2)) & 0b11
data[i] = adc_mu_to_volt(adc_data[i], gain, self.v_ref)