diff --git a/wigglecam/services/acquisitionservice.py b/wigglecam/services/acquisitionservice.py index 40d9b15..250af43 100644 --- a/wigglecam/services/acquisitionservice.py +++ b/wigglecam/services/acquisitionservice.py @@ -232,7 +232,7 @@ def _sync_fun(self): timestamp_ns = self._gpio_backend.wait_for_clock_rise_signal(timeout=1) except TimeoutError: # stop devices when no clock is avail, supervisor enables again after clock is received, derives new framerate ans starts backends - logger.error("clock signal missing.") + logger.warning("clock signal missing.") break else: self._camera_backend.sync_tick(timestamp_ns) diff --git a/wigglecam/services/backends/cameras/abstractbackend.py b/wigglecam/services/backends/cameras/abstractbackend.py index 809764c..2b0715e 100644 --- a/wigglecam/services/backends/cameras/abstractbackend.py +++ b/wigglecam/services/backends/cameras/abstractbackend.py @@ -2,7 +2,7 @@ import logging from abc import ABC, abstractmethod from dataclasses import dataclass -from queue import Full, Queue +from queue import Empty, Full, Queue from threading import Barrier, BrokenBarrierError, Condition, Event, current_thread from typing import Literal @@ -149,7 +149,10 @@ def _ticker_fun(self): logger.debug("starting _ticker_fun") while not current_thread().stopped(): - self._current_timestampset.reference = self._current_timestamp_reference_in_queue.get(block=True, timeout=1.0) + try: + self._current_timestampset.reference = self._current_timestamp_reference_in_queue.get(block=True, timeout=1.0) + except Empty: + logger.warning("did not receive updated reference timestamp within timeout") try: self._barrier.wait()