Skip to content

Commit b672a99

Browse files
fallensbourdeauducq
authored andcommittedFeb 26, 2015
lda: add support for ping
1 parent d51493f commit b672a99

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

Diff for: ‎artiq/devices/lda/driver.py

+10
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ def set_attenuation(self, attenuation):
6363
print("setting attenuation to {}".format(att))
6464
self._attenuation = att
6565

66+
def ping(self):
67+
return True
68+
6669

6770
class Lda:
6871
"""Lab Brick Digital Attenuator driver.
@@ -230,3 +233,10 @@ def set_attenuation(self, attenuation):
230233
raise ValueError("Cannot set attenuation {} < 0".format(att))
231234
else:
232235
self.set(0x8d, bytes([int(round(att.amount*4))]))
236+
237+
def ping(self):
238+
try:
239+
self.get_attenuation()
240+
except:
241+
return False
242+
return True

0 commit comments

Comments
 (0)
Please sign in to comment.