also sleep for first

This commit is contained in:
j 2021-11-23 12:47:53 +01:00
parent e55b4a678f
commit 8d9af8d917

View File

@ -195,6 +195,7 @@ class Camera:
while True:
if goto_first:
segment_t0 = time.time()
if isinstance(first, dict):
if 'seqid' in first and first['seqid'] not in self.segment_times:
self.segment_times[first['seqid']] = 0
@ -202,6 +203,11 @@ class Camera:
self.fast_preset(first, True)
#self.goto_preset(first, pan=speed, tilt=speed)
self.sleep(3)
if isinstance(first, dict) and 'sleep' in first:
self.sleep(first['sleep'])
segment_time = time.time() - segment_t0
if isinstance(first, dict) and 'seqid' in first:
self.segment_times[first['seqid']] = segment_time
self.sequence_start = t0 = time.time()
for step in steps:
next_hour = time.gmtime().tm_hour