|
|
@@ -1049,7 +1049,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
print("device_id============>>>", device_id)
|
|
|
logger.info("device_id============>>>%s", device_id)
|
|
|
if device_id > 0:
|
|
|
- if device_id == 1:
|
|
|
+ if device_id == settings.MCU_CODE:
|
|
|
state, _ = self.to_connect_com(port_name)
|
|
|
if not state:
|
|
|
return False
|
|
|
@@ -1162,7 +1162,7 @@ class DeviceControl(BaseClass, metaclass=SingletonType):
|
|
|
return False, None
|
|
|
if receive_data:
|
|
|
# receive_data[2]=1 表示为MCU设备编号
|
|
|
- if receive_data[0] == 90 and receive_data[2] == 1:
|
|
|
+ if receive_data[0] == 90 and receive_data[2] == settings.MCU_CODE:
|
|
|
connect_flag = receive_data[1]
|
|
|
# 是否有初始化
|
|
|
try:
|