forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 12 additions and 0 deletions

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