added new Camera class for opencv video processing (currently does not work with Pi-Camera)

changed logging a bit
This commit is contained in:
Joel Klimont 2022-11-05 21:18:24 +01:00
parent b87e830ac3
commit de9b671f29
5 changed files with 244 additions and 10 deletions

View file

@ -3,16 +3,10 @@ import os
import time
from typing import Tuple, List, Dict
import requests as requests
import requests
import logging
logger = logging.getLogger("seeding-api")
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
ch.setFormatter(formatter)
logger.addHandler(ch)
logger = logging.getLogger("complib-logger")
RETRY_TIMEOUT = 0.05
@ -22,7 +16,7 @@ API_URL = os.getenv("API_URL", "http://localhost:5000/") + "api/"
api_override = os.getenv("API_FORCE", "")
if api_override != "":
print(f"API_URL was set to {API_URL} but was overwritten with {api_override}")
logger.warning(f"API_URL was set to {API_URL} but was overwritten with {api_override}")
API_URL = api_override
API_URL_GET_ROBOT_STATE = API_URL + "getRobotState"