From d32a308c6f6286669ac5941d1616bfdc9829361e Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 24 二月 2025 17:22:43 +0800
Subject: [PATCH] 2025年02月24日17:22:38

---
 app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
index bed9acb..f50ad83 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -1732,7 +1732,13 @@
         gatewayBean.setDevice_name(cloudInverterDeviceBean.getName());//璁惧鍚嶇О
         gatewayBean.setGatewayType(cloudInverterDeviceBean.getSpk());//璁剧疆spk
         gatewayBean.setLocalEncrypt(true);
-        gatewayBean.setMaster(GatewayMasterType.MasterTrue);//榛樿閮芥槸涓婚�嗗彉鍣�(浠ュ悗鏀寔浠庨�嗗彉鍣ㄨ鏇存敼)
+        if (cloudInverterDeviceBean.getSpk().equals(HdlDeviceLogic.sHdlDeviceLogic.OFF_INVERTER_OG_SPK)) {
+            //绂荤綉閫嗗彉鍣�
+            gatewayBean.setMaster(String.valueOf(cloudInverterDeviceBean.isMaster()));//榛樿閮芥槸涓婚�嗗彉鍣�(浠ュ悗鏀寔浠庨�嗗彉鍣ㄨ鏇存敼)
+        } else {
+            //閫嗗彉鍣�
+            gatewayBean.setMaster(GatewayMasterType.MasterTrue);//榛樿閮芥槸涓婚�嗗彉鍣�(浠ュ悗鏀寔浠庨�嗗彉鍣ㄨ鏇存敼)
+        }
         gatewayBean.setSystemStatusDesc(cloudInverterDeviceBean.getSystemStatusDesc());//璁惧鐘舵��
         gatewayBean.setHwVersion(cloudInverterDeviceBean.getHwVersion());//杞欢鐗堟湰鍙�
         gatewayBean.setCategorySecondName(cloudInverterDeviceBean.getCategorySecondName());//璁惧绫诲瀷(浜у搧浜岀骇鍒嗙被鍚嶇О

--
Gitblit v1.8.0