mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
Update driver.py
Fix 32dB limit bug
This commit is contained in:
parent
4c4da77cc8
commit
c971a6f1c6
@ -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"))
|
||||
|
Loading…
Reference in New Issue
Block a user