forked from M-Labs/kirdy
driver: Wait for a sec after hard rst cmd is sent
This commit is contained in:
parent
4a06a7579f
commit
b73eacd234
|
@ -254,8 +254,14 @@ class Device:
|
|||
"""
|
||||
Hard Reset Kirdy. The socket connection will be closed by Kirdy.
|
||||
Laser diode power and Tec power will be turned off.
|
||||
Kirdy will send out a json({'msg_type': 'HardReset'}) to all sockets indicating. The device is being reset.
|
||||
"""
|
||||
return await self._send_cmd(TARGET_DEVICE, "HardReset")
|
||||
response = await self._send_cmd(TARGET_DEVICE, "HardReset")
|
||||
if response is not None:
|
||||
if response["msg_type"] == "Acknowledge":
|
||||
# Delay for a second to wait for the hard reset message being sent out on Kirdy
|
||||
await asyncio.sleep(1.0)
|
||||
return response
|
||||
|
||||
class Laser:
|
||||
def __init__(self, send_cmd_handler, cmd_lock):
|
||||
|
|
Loading…
Reference in New Issue