2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

add ping() to novatech driver

This commit is contained in:
Joe Britton 2015-08-25 22:01:51 -06:00 committed by Sebastien Bourdeauducq
parent d5f2f5c062
commit b790fb093d

View File

@ -210,3 +210,15 @@ class Novatech409B:
result = [r.rstrip().decode() for r in result]
logger.debug("got device status: %s", result)
return result
def ping(self):
try:
stat = self.get_status()
except:
return False
# check that version number matches is "21"
if stat[4][20:] == "21":
logger.debug("ping successful")
return True
else:
return False