Files
pig-house-controller/main/main.py
2025-10-08 15:46:41 +08:00

31 lines
599 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
猪舍主控系统主程序入口
"""
import time
# import struct # 根据需要保留或删除
# import client_pb # 根据需要保留或删除
def main_loop():
"""
主循环
"""
print("猪舍控制系统启动...")
while True:
# 在这里添加你的逻辑
time.sleep(1) # 避免空循环占用过多CPU
# 程序入口
if __name__ == "__main__":
try:
main_loop()
except KeyboardInterrupt:
print("程序被中断")
except Exception as e:
print(f"程序异常: {e}")