Skip to content

Commit

Permalink
Return ETR and total time
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Aug 26, 2024
1 parent 1fb0224 commit 6435fef
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python/lvmscp/actor/commands/etr.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

from typing import TYPE_CHECKING

from lvmscp.delegate import EXPECTED_READOUT_TIME

from . import parser


Expand All @@ -22,9 +24,12 @@ async def get_etr(command: CommandType, *_):
"""Gets the ETR of the exposure."""

delegate = command.actor.exposure_delegate
e_data = delegate.expose_data
etr = delegate.get_etr()

if etr is None:
if etr is None or e_data is None:
command.warning("ETR not available. The controllers may be idle.")

command.finish(etr=etr)
assert e_data

command.finish(etr=[etr, e_data.exposure_time + EXPECTED_READOUT_TIME])

0 comments on commit 6435fef

Please sign in to comment.