Commit message

This commit is contained in:
support.sampyo 2024-07-04 05:45:11 +00:00
parent ad62a2f89e
commit f54f9e7fb5
2 changed files with 12 additions and 10 deletions

View File

@ -7,5 +7,5 @@ spec:
virtualEnv: base # 사용할 가상환경 이름입니다. virtualEnv: base # 사용할 가상환경 이름입니다.
package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.) package: requirements.txt # 설치할 Python 패키지 정보 파일입니다.(기본 값은 requirement.txt 입니다.)
stackbase: stackbase:
tagName: v0.0.42 # Stackbase(gitea)에 릴리즈 태그명 입니다. tagName: v0.0.43 # Stackbase(gitea)에 릴리즈 태그명 입니다.
repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다. repoName: sampyo-dio # Stackbase(gitea)에 저장될 저장소 이릅니다.

20
main.py
View File

@ -49,10 +49,11 @@ def Valve_PureWater(chip, status, action, duration=7):
chip.set_values(status) chip.set_values(status)
time.sleep(duration) time.sleep(duration)
else: # 'Off' else: # 'Off'
status[2] = 0 if pure_value_status != 0:
status[3] = 1 status[2] = 0
chip.set_values(status) status[3] = 1
time.sleep(7) chip.set_values(status)
time.sleep(7)
status[2] = 0 status[2] = 0
status[3] = 0 status[3] = 0
@ -88,10 +89,11 @@ def Valve_MainWater(chip, status, action, duration=7):
chip.set_values(status) chip.set_values(status)
time.sleep(duration) time.sleep(duration)
else: # 'Off' else: # 'Off'
status[5] = 0 if main_valve_status != 0:
status[6] = 1 status[5] = 0
chip.set_values(status) status[6] = 1
time.sleep(7) chip.set_values(status)
time.sleep(7)
status[5] = 0 status[5] = 0
status[6] = 0 status[6] = 0
@ -473,7 +475,7 @@ def start_server(addr, port):
def exit_handler(signum, frame): def exit_handler(signum, frame):
Motor(chip=output_lines, status=status, action='Off') Motor(chip=output_lines, status=status, action='Off')
Valve_Vent(chip=output_lines, status=status, action='Off') Valve_Vent(chip=output_lines, status=status, action='Off')
Valve_MixedWater(chip=output_lines, status=status, action='Off') # Valve_MixedWater(chip=output_lines, status=status, action='Off')
Valve_PureWater(chip=output_lines, status=status, action='Off') Valve_PureWater(chip=output_lines, status=status, action='Off')
Valve_EnterWater(chip=output_lines, status=status, action='Off') Valve_EnterWater(chip=output_lines, status=status, action='Off')
Valve_MainWater(chip=output_lines, status=status, action='Off') Valve_MainWater(chip=output_lines, status=status, action='Off')