diff --git a/pykirdy/driver/kirdy_async.py b/pykirdy/driver/kirdy_async.py index aa272fc..4065f98 100644 --- a/pykirdy/driver/kirdy_async.py +++ b/pykirdy/driver/kirdy_async.py @@ -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):