Changes by etienne

This commit is contained in:
aniketSaha 2025-08-27 16:01:13 +02:00
parent dd6cc73cf0
commit 5df448841c

View File

@ -464,7 +464,7 @@ async def auto_test_pu1(ploop_setpoint: float = Query(0.0)):
tasks["pu1"].cancel() tasks["pu1"].cancel()
logging.info("[AUTO TEST] PU1 Cancelled") logging.info("[AUTO TEST] PU1 Cancelled")
task = asyncio.create_task(run_auto_test_pu1(pu, ploop_setpoint)) task = asyncio.create_task(run_auto_test_pu1())
tasks["pu1"] = task tasks["pu1"] = task
return {"status": "started", "pu": pu} return {"status": "started", "pu": pu}
@ -493,9 +493,9 @@ async def stop_auto_test(pu: int):
logging.info(f"[AUTO TEST] Stopping {pu} No test Runining") logging.info(f"[AUTO TEST] Stopping {pu} No test Runining")
return {"status": "no task running", "pu": pu} return {"status": "no task running", "pu": pu}
async def run_auto_test_pu1(pu: int, ploop_setpoint: float): async def run_auto_test_pu1(pu: int = 1):
try: try:
await send_command_with_delay("PRE-PRODUCTION", pu = pu, delay_s=0, ploop_setpoint=ploop_setpoint, qperm_setpoint=1200.0) await send_command_with_delay("PRE-PRODUCTION", pu = pu, delay_s=0, ploop_setpoint=2.5, qperm_setpoint=1200.0)
print("SENDING PRE PROD at ", time.time()) print("SENDING PRE PROD at ", time.time())
await set_patients_with_delay(5, delay_s=10) await set_patients_with_delay(5, delay_s=10)
print("SENDING set_patients_with_delay ", time.time()) print("SENDING set_patients_with_delay ", time.time())