米厂码垛修改

This commit is contained in:
2025-09-10 09:16:57 +08:00
parent 2f45c4c38f
commit 65dde435c8
47 changed files with 11258 additions and 10485 deletions

View File

@ -1,6 +1,7 @@
import socket
import binascii
import time
import Constant
# 网络继电器的 IP 和端
HOST = '192.168.0.18'
@ -24,6 +25,8 @@ valve_commands = {
# 将十六进制字符串转换为字节数据并发送
def send_command(command):
if Constant.DebugPosition:
return True
byte_data = binascii.unhexlify(command)
# 创建套接字并连接到继电器
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: