Qperm setpoint modified

This commit is contained in:
Etienne Chassaing 2025-08-27 15:21:37 +02:00
parent 81983707c8
commit 3cfa5ef80e

12
main.py
View File

@ -471,7 +471,7 @@ async def stop_auto_test(pu: int):
print("tasks",tasks) print("tasks",tasks)
if key in tasks and not tasks[key].done(): if key in tasks and not tasks[key].done():
tasks[key].cancel() tasks[key].cancel()
await send_command_with_delay("IDLE", pu, delay_s=0) await send_command_with_delay("IDLE", pu =pu, delay_s=0)
logging.info(f"[AUTO TEST] {key} STOPPED") logging.info(f"[AUTO TEST] {key} STOPPED")
return {"status": "stopped", "pu": pu} return {"status": "stopped", "pu": pu}
@ -480,10 +480,10 @@ async def stop_auto_test(pu: int):
async def run_auto_test_pu1(pu: int, ploop_setpoint: float): async def run_auto_test_pu1(pu: int, ploop_setpoint: float):
try: try:
await send_command_with_delay("PRE-PRODUCTION", pu, delay_s=0, ploop_setpoint=ploop_setpoint) await send_command_with_delay("PRE-PRODUCTION", pu = pu, delay_s=0, ploop_setpoint=ploop_setpoint, qperm_setpoint=1200.0)
await set_patients_with_delay(5, delay_s=200) await set_patients_with_delay(5, delay_s=200)
await set_patients_with_delay(10, delay_s=220) await set_patients_with_delay(10, delay_s=220)
await send_command_with_delay("IDLE", pu, delay_s=60, ploop_setpoint=ploop_setpoint) await send_command_with_delay("IDLE", pu =pu, delay_s=60, ploop_setpoint=ploop_setpoint, qperm_setpoint=1200.0)
logging.info("[AUTO TEST] Finished PU1 test") logging.info("[AUTO TEST] Finished PU1 test")
except asyncio.CancelledError: except asyncio.CancelledError:
@ -497,12 +497,12 @@ async def run_auto_test_pu2(ploop_setpoint: float):
# await run_auto_test_pu1(1, ploop_setpoint) # await run_auto_test_pu1(1, ploop_setpoint)
# Step 2: PU2 sequence # Step 2: PU2 sequence
await send_command_with_delay("PRE-PRODUCTION", 2, delay_s=0, ploop_setpoint=ploop_setpoint) await send_command_with_delay("PRE-PRODUCTION", pu=2, delay_s=0, ploop_setpoint=ploop_setpoint, qperm_setpoint=1200.0)
# await send_command_with_delay("PRODUCTION", 2, delay_s=180, ploop_setpoint=ploop_setpoint) # await send_command_with_delay("PRODUCTION", 2, delay_s=180, ploop_setpoint=ploop_setpoint)
await set_patients_with_delay(15, delay_s=60) await set_patients_with_delay(15, delay_s=60)
await set_patients_with_delay(0, delay_s=60) await set_patients_with_delay(0, delay_s=60)
await send_command_with_delay("IDLE", 2, delay_s=60, ploop_setpoint=ploop_setpoint) await send_command_with_delay("IDLE", pu=2, delay_s=60, ploop_setpoint=ploop_setpoint, qperm_setpoint=1200.0)
await send_command_with_delay("IDLE", 1, delay_s=60, ploop_setpoint=ploop_setpoint) await send_command_with_delay("IDLE", pu=1, delay_s=60, ploop_setpoint=ploop_setpoint, qperm_setpoint=1200.0)
logging.info("[AUTO TEST] Finished PU1 + PU2 test") logging.info("[AUTO TEST] Finished PU1 + PU2 test")
except asyncio.CancelledError: except asyncio.CancelledError:
logging.info(f"[AUTO TEST] PU 2 task cancelled") logging.info(f"[AUTO TEST] PU 2 task cancelled")