From 5c41e0664d3fba9a13b35c73837c4fcb7a218a90 Mon Sep 17 00:00:00 2001 From: "support.sampyo" Date: Thu, 4 Jul 2024 05:50:25 +0000 Subject: [PATCH] Commit message --- framework.yaml | 2 +- main.py | 40 ++++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/framework.yaml b/framework.yaml index 5f0678f..d1bd1ea 100644 --- a/framework.yaml +++ b/framework.yaml @@ -7,5 +7,5 @@ spec: virtualEnv: base # 사용할 가상환경 이름입니다. package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.) stackbase: - tagName: v0.0.43 # Stackbase(gitea)에 릴리즈 태그명 입니다. + tagName: v0.0.44 # Stackbase(gitea)에 릴리즈 태그명 입니다. repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다. diff --git a/main.py b/main.py index fb5b0f2..bdd8d41 100644 --- a/main.py +++ b/main.py @@ -144,20 +144,20 @@ def Command_Read(): if cmd['type'] == 'auto': main_duration = float(cmd['device']['main']['duration']) pure_duration = float(cmd['device']['pure']['duration']) - setp0_duration = float(cmd['working-time']['setp0']) - setp1_duration = float(cmd['working-time']['setp1']) - setp2_duration = float(cmd['working-time']['setp2']) - setp3_duration = float(cmd['working-time']['setp3']) - setp4_duration = float(cmd['working-time']['setp4']) - setp5_duration = float(cmd['working-time']['setp5']) - setp6_duration = float(cmd['working-time']['setp6']) - setp7_duration = float(cmd['working-time']['setp7']) - setp8_duration = float(cmd['working-time']['setp8']) - setp9_duration = float(cmd['working-time']['setp9']) + step0_duration = float(cmd['working-time']['step0']) + step1_duration = float(cmd['working-time']['step1']) + step2_duration = float(cmd['working-time']['step2']) + step3_duration = float(cmd['working-time']['step3']) + step4_duration = float(cmd['working-time']['step4']) + step5_duration = float(cmd['working-time']['step5']) + step6_duration = float(cmd['working-time']['step6']) + step7_duration = float(cmd['working-time']['step7']) + step8_duration = float(cmd['working-time']['step8']) + step9_duration = float(cmd['working-time']['step9']) # Step 0. Mesure init weight before starting the sequence - time.sleep(setp0_duration) + time.sleep(step0_duration) start = Measure_Weight(client=client) # Step 1. Vent pured water before input mixed water @@ -167,19 +167,19 @@ def Command_Read(): Valve_Vent(chip=output_lines, status=status, action='On') time.sleep(0.5) Valve_MainWater(chip=output_lines, status=status, action='On', duration=main_duration) - time.sleep(setp1_duration) + time.sleep(step1_duration) # Step 2. Empty the remaining pure water # Target valve status: [Motor: Off, Vent: On, Pure: Off, Enter: Off, Main: On] Valve_EnterWater(chip=output_lines, status=status, action='Off') - time.sleep(setp2_duration) + time.sleep(step2_duration) # Step 3. Input the mixed water # Target valve status: [Motor: Off, Vent: Off, Pure: Off, Enter: On, Main: On] Valve_Vent(chip=output_lines, status=status, action='Off') time.sleep(0.5) Valve_EnterWater(chip=output_lines, status=status, action='On') - time.sleep(setp3_duration) + time.sleep(step3_duration) # Step 4. Mesure the weight # Target valve status: [Motor: Off, Vent: Off, Pure: Off, Enter: Off, Main: Off] @@ -187,7 +187,7 @@ def Command_Read(): time.sleep(0.5) Valve_MainWater(chip=output_lines, status=status, action='Off') - time.sleep(setp4_duration) + time.sleep(step4_duration) end = Measure_Weight(client=client) time.sleep(1) @@ -200,12 +200,12 @@ def Command_Read(): Valve_Vent(chip=output_lines, status=status, action='On') time.sleep(0.5) Valve_PureWater(chip=output_lines, status=status, action='On', duration=pure_duration) - time.sleep(setp5_duration) + time.sleep(step5_duration) # Step 6. Drain mixed water # Target valve status: [Motor: Off, Vent: On, Pure: On, Enter: Off, Main: Off] Valve_EnterWater(chip=output_lines, status=status, action='Off') - time.sleep(setp6_duration) + time.sleep(step6_duration) # Step 7. Input pure water and clean # Target valve status: [Motor: On, Vent: Off, Pure: On, Enter: On, Main: Off] @@ -214,7 +214,7 @@ def Command_Read(): Valve_Vent(chip=output_lines, status=status, action='Off') time.sleep(0.5) Motor(chip=output_lines, status=status, action='On') - time.sleep(setp7_duration) + time.sleep(step7_duration) # Step 8. Drain pure Water # Target valve status: [Motor: On, Vent: On, Pure: Off, Enter: Off, Main: Off] @@ -223,12 +223,12 @@ def Command_Read(): Valve_Vent(chip=output_lines, status=status, action='On') time.sleep(0.5) Valve_PureWater(chip=output_lines, status=status, action='Off') - time.sleep(setp8_duration) + time.sleep(step8_duration) # Step 9. Stop moter # Target valve status: [Motor: Off, Vent: On, Pure: Off, Enter: Off, Main: Off] Motor(chip=output_lines, status=status, action='Off') - time.sleep(setp9_duration) + time.sleep(step9_duration) return 1