Example #1
0
def check_digital_io():
    """The top-level method to testing digital I/O's with adafruit blinka digitalio.
    """
    try:
        pin = digitalio.DigitalInOut(board.D4)
    except Exception as e:
        from t_system import log_manager
        logger = log_manager.get_logger(__name__, "DEBUG")

        logger.error(f'{e}')
Example #2
0
def check_spi():
    """The top-level method to testing SPI with adafruit blinka busio.
    """

    try:
        spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
    except Exception as e:
        from t_system import log_manager
        logger = log_manager.get_logger(__name__, "DEBUG")

        logger.error(f'{e}')
Example #3
0
def check_i2c():
    """The top-level method to testing I2C with adafruit blinka busio.
    """

    try:
        i2c = busio.I2C(board.SCL, board.SDA)
    except Exception as e:
        from t_system import log_manager
        logger = log_manager.get_logger(__name__, "DEBUG")

        logger.error(f'{e}')
Example #4
0
    :platform: Unix
    :synopsis: the top-level submodule of T_System's remote_ui that contains the functions for managing of t_system's video and audio stream.

.. moduleauthor:: Cem Baybars GÜÇLÜ <*****@*****.**>
"""

import threading
import time  # Time access and conversions
import numpy as np

from t_system import seer
from t_system import dot_t_system_dir

from t_system import log_manager

logger = log_manager.get_logger(__name__, "DEBUG")


class StreamManager:
    """Class to define a manager for asynchronous work of t_system's online video stream.

        This class provides necessary initiations and a function named
        :func:`t_system.remote_ui.modules.stream.StreamManager.get_stream`
        for the provide getting stream by calling iteratively the seer's current_frame member.
    """
    def __init__(self):
        """Initialization method of :class:`t_system.remote_ui.modules.stream.StreamManager` class.
        """

        self.stop_thread = False
        self.watch_thread = threading.Thread(target=seer.watch,