diff --git a/main.py b/main.py index addd49d..0d2cbc1 100644 --- a/main.py +++ b/main.py @@ -31,7 +31,7 @@ if platform.system() in ["Darwin"]: # macOS or Windows else: from classCAN import CANBackend # Your real backend - logging.basicConfig(level=logging.INFO) + logging.basicConfig(level=logging.DEBUG) logging.getLogger("uvicorn.access").setLevel(logging.WARNING) @@ -392,6 +392,7 @@ async def auto_test_pu3(): # PATIENT SKID HELPERS async def update_latest_flow(): + global active_PUs async with aiohttp.ClientSession() as session: while True: try: @@ -400,6 +401,9 @@ async def update_latest_flow(): latest_flow = int(data["log"]["flow"]) logging.debug(f"Updated flow: {latest_flow}") latest_data["PatientSkid"]["QSkid"] = latest_flow + # for index in active_PUs : + # logging.debug("PU_"+str(index)) + # latest_data["PU_"+str(index)]["QSkid"] = latest_flow # Adding the data to all actives PUs except Exception as e: logging.error(f"Error fetching flow: {e}") diff --git a/static/monitor.html b/static/monitor.html index a2571f4..03ed292 100644 --- a/static/monitor.html +++ b/static/monitor.html @@ -1,8 +1,9 @@ +
- +