Skip to content

Commit

Permalink
Add delay after enabling engineering mode
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Jan 7, 2025
1 parent 71a8daf commit 8ee7791
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/lvmecp/actor/commands/engineering.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from __future__ import annotations

import asyncio

from typing import TYPE_CHECKING

import click
Expand Down Expand Up @@ -78,6 +80,7 @@ async def enable(
modbus = command.actor.plc.modbus

await command.actor.engineering_mode(True, timeout=timeout)
await asyncio.sleep(0.5) # Allow time for the e-mode task to run.

if hardware_override:
await modbus.write_register("engineering_mode_hardware_remote", True)
Expand Down

0 comments on commit 8ee7791

Please sign in to comment.