2 PUs sequence

This commit is contained in:
Etienne Chassaing 2025-08-28 14:30:36 +02:00
parent 516c4e9517
commit 7fd287fd06

14
main.py
View File

@ -553,11 +553,17 @@ async def run_auto_test_1(pu: int = 1):
raise
async def run_auto_test_2():
ploop_setpoint = 2.5
try:
# Step 1: Run PU1 test
# await run_auto_test_1(1, ploop_setpoint)
# TODO : TODO
await send_command_with_delay("PRE-PRODUCTION", pu=1, delay_s=0, ploop_setpoint=2.5, qperm_setpoint=1200.0)
await send_command_with_delay("PRE-PRODUCTION", pu=1, delay_s=90, ploop_setpoint=2.5, qperm_setpoint=1200.0)
await asyncio.sleep(90) # Starting time of the machine
await set_patients_with_delay(5, delay_s=10)
await set_patients_with_delay(10, delay_s=40)
await asyncio.sleep(100)
await send_command_with_delay("IDLE", pu=1, delay_s=0, ploop_setpoint=2.5, qperm_setpoint=1200.0)
await send_command_with_delay("IDLE", pu=2, delay_s=10, ploop_setpoint=2.5, qperm_setpoint=1200.0)
logging.info("[AUTO TEST] Finished PU1 + PU2 test")
except asyncio.CancelledError:
logging.info(f"[AUTO TEST] PU 2 task cancelled")