Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4c4da77cc805
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1354ccbbc1f8
Choose a head ref
  • 3 commits
  • 1 file changed
  • 2 contributors

Commits on Jan 5, 2015

  1. Update driver.py

    Fix 32dB limit bug
    dhslichter committed Jan 5, 2015
    Copy the full SHA
    c971a6f View commit details

Commits on Jan 6, 2015

  1. Update driver.py

    dhslichter committed Jan 6, 2015
    Copy the full SHA
    ff37cdc View commit details
  2. Merge pull request #7 from dhslichter/patch-1

    lda: fix 32 dB limit, add LDA-302P-1 support
    sbourdeauducq committed Jan 6, 2015
    Copy the full SHA
    1354ccb View commit details
Showing with 2 additions and 1 deletion.
  1. +2 −1 artiq/devices/lda/driver.py
3 changes: 2 additions & 1 deletion artiq/devices/lda/driver.py
Original file line number Diff line number Diff line change
@@ -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 @@ def set_attenuation(self, attenuation):
:type attenuation: int, float or Fraction
"""
self.set(0x8d, bytes(chr(int(round(attenuation*4))), "ascii"))
self.set(0x8d, bytes([int(round(attenuation*4))]))