forked from M-Labs/artiq
1
0
Fork 0

korad_ka3005p: fix simulation mode

This commit is contained in:
Sebastien Bourdeauducq 2016-12-19 09:49:44 +01:00
parent 161025e7df
commit 68b2373b9a
1 changed files with 6 additions and 3 deletions

View File

@ -47,9 +47,12 @@ class KoradKA3005P:
return r return r
async def _ser_write(self, cmd): async def _ser_write(self, cmd):
logger.debug("_write %s: ", cmd) if self.simulation:
await asyncio.sleep(0.1) logger.info("simulation _ser_write(\"%s\")", cmd)
await self.port.write(cmd.encode('ascii')) else:
logger.debug("_ser_write(\"%s\")", cmd)
await asyncio.sleep(0.1)
await self.port.write(cmd.encode("ascii"))
async def setup(self): async def setup(self):
"""Configure in known state.""" """Configure in known state."""