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

korad_ka3005p: fix simulation mode

This commit is contained in:
Sebastien Bourdeauducq 2016-12-19 09:49:44 +01:00
parent 161025e7df
commit 68b2373b9a

View File

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