From 82c4f0eed42ee31653dd2fda109571e35573b3b0 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Wed, 21 Mar 2018 14:22:13 +0100 Subject: [PATCH] sampler: fix channel gain retrieval --- artiq/coredevice/sampler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/coredevice/sampler.py b/artiq/coredevice/sampler.py index 3bb94f555..66c8d45ad 100644 --- a/artiq/coredevice/sampler.py +++ b/artiq/coredevice/sampler.py @@ -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)