|
|
@@ -96,7 +96,7 @@ class AddressConfigProtocol:
|
|
|
|
|
|
def __init__(self, serial_port):
|
|
|
self.serial = serial_port
|
|
|
- self.default_timeout = 1.0
|
|
|
+ self.default_timeout = 2.0
|
|
|
self.stored_devices = {}
|
|
|
|
|
|
def add_stored_device(self, uid: str, address: int):
|
|
|
@@ -268,7 +268,7 @@ class ModbusRTUClient:
|
|
|
|
|
|
def __init__(self, serial_port):
|
|
|
self.serial = serial_port
|
|
|
- self.default_timeout = 1.0
|
|
|
+ self.default_timeout = 2.0
|
|
|
|
|
|
def _build_request(self, device_address: int, function_code: int, data: bytes = b'') -> bytes:
|
|
|
"""构建Modbus请求帧"""
|