From c971a6f1c68807b966cdf2d1bd5330c826ebde80 Mon Sep 17 00:00:00 2001 From: dhslichter Date: Mon, 5 Jan 2015 15:52:47 -0700 Subject: [PATCH] Update driver.py Fix 32dB limit bug --- artiq/devices/lda/driver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/artiq/devices/lda/driver.py b/artiq/devices/lda/driver.py index b98777f2d..2e422c2ab 100644 --- a/artiq/devices/lda/driver.py +++ b/artiq/devices/lda/driver.py @@ -57,6 +57,7 @@ class Lda: _product_ids = { "LDA-102": 0x1207, "LDA-602": 0x1208, + "LDA-302P-1": 0x120E, } def __init__(self, serial=None, product="LDA-102"): @@ -158,4 +159,4 @@ class Lda: :type attenuation: int, float or Fraction """ - self.set(0x8d, bytes(chr(int(round(attenuation*4))), "ascii")) + self.set(0x8d, bytes(chr(int(round(attenuation*4))), "latin_1"))