Beispiel #1
0
def main(argv):

    try:
        # read YAML configuration
        _loader = ConfigLoader(Level.INFO)
        filename = 'config.yaml'
        _config = _loader.configure(filename)

        _lux = Lux(Level.INFO)
        _matrix11x7_stbd_available = True
        _video = Video(_config, _lux, _matrix11x7_stbd_available, Level.INFO)
        _video.start()

        while True:
            time.sleep(1.0)

        _video.stop()

    except KeyboardInterrupt:
        print(Fore.CYAN + Style.BRIGHT + 'caught Ctrl-C; exiting...')
        if _video is not None:
            _video.stop()

    except Exception:
        print(Fore.RED + Style.BRIGHT +
              'error starting ros: {}'.format(traceback.format_exc()) +
              Style.RESET_ALL)
Beispiel #2
0
def main(argv):

    _video = None

    try:
        # read YAML configuration
        _loader = ConfigLoader(Level.INFO)
        _config = _loader.configure('config.yaml')

        _video = Video(_config, Level.INFO)
        _video.start()

        while True:
            time.sleep(1.0)
    except KeyboardInterrupt:
        print(Fore.CYAN + Style.BRIGHT + 'caught Ctrl-C; exiting...')
    except Exception:
        print(Fore.RED + Style.BRIGHT +
              'error starting ros: {}'.format(traceback.format_exc()) +
              Style.RESET_ALL)
    finally:
        if _video is not None:
            _video.stop()