From 0956b5497e1602218f0b6c4797b39d34584e2bec Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 21 三月 2024 09:32:48 +0800
Subject: [PATCH] 2024年03月21日09:32:35

---
 app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java |    6 ++++--
 1 files changed, 4 insertions(+), 2 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 72f142e..5684386 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -568,7 +568,7 @@
     public void editGatewayParam(String mac, LinkCallBack<Boolean> linkCallBack) {
         String requestUrl = TopicApi.SET_GATEWAY_EDIT;
         JsonObject json = new JsonObject();
-        json.addProperty("master", GatewayMasterType.MasterFalse);
+        json.addProperty("master", GatewayMasterType.MasterTrue);
         TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, json, "", new HDLLinkCallBack() {
             @Override
             public void onSuccess(String msg) {
@@ -631,7 +631,7 @@
         JsonObject sendJsonObj = new JsonObject();
         JsonObject jObject = new JsonObject();
         jObject.addProperty("device_mac", mac);
-//        jObject.addProperty("reset_factory", "true");//涓篺alse鎴栨棤姝ゅ瓧娈碉紝鍒欎负"娓呴櫎鏁版嵁"
+        jObject.addProperty("reset_factory", "true");//涓篺alse鎴栨棤姝ゅ瓧娈碉紝鍒欎负"娓呴櫎鏁版嵁"
         sendJsonObj.add("objects", jObject);
         TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, sendJsonObj, "", new HDLLinkCallBack() {
             @Override
@@ -639,6 +639,7 @@
                 if (linkCallBack != null) {
                     linkCallBack.onSuccess(true);
                 }
+                HdlLogLogic.print("鍒濆鍖栭�嗗彉鍣ㄦ垚鍔�-->mac:" + mac, true);
             }
 
             @Override
@@ -646,6 +647,7 @@
                 if (linkCallBack != null) {
                     linkCallBack.onError(e);
                 }
+                HdlLogLogic.print("鍒濆鍖栭�嗗彉鍣ㄥけ璐�-->mac:" + mac + "--->" + e.getMsg() + "(" + e.getCode() + ")", true);
             }
         });
 

--
Gitblit v1.8.0