From 316edc17322cd39ca9b9bd285ba63018cebfa2b4 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 21 三月 2024 15:12:10 +0800
Subject: [PATCH] 2024年03月21日15:11:23
---
app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java | 8 ++++----
1 files changed, 4 insertions(+), 4 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 d5bf0a7..90a3a1e 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) {
@@ -628,17 +628,16 @@
*/
public void initializeGateway(String mac, LinkCallBack<Boolean> linkCallBack) {
String requestUrl = TopicApi.GATEWAY_INITIALIZE_REMOTE;
- JsonObject sendJsonObj = new JsonObject();
JsonObject jObject = new JsonObject();
jObject.addProperty("device_mac", mac);
jObject.addProperty("reset_factory", "true");//涓篺alse鎴栨棤姝ゅ瓧娈碉紝鍒欎负"娓呴櫎鏁版嵁"
- sendJsonObj.add("objects", jObject);
- TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, sendJsonObj, "", new HDLLinkCallBack() {
+ TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, jObject, "", new HDLLinkCallBack() {
@Override
public void onSuccess(String json) {
if (linkCallBack != null) {
linkCallBack.onSuccess(true);
}
+ HdlLogLogic.print("鍒濆鍖栭�嗗彉鍣ㄦ垚鍔�-->mac:" + mac, true);
}
@Override
@@ -646,6 +645,7 @@
if (linkCallBack != null) {
linkCallBack.onError(e);
}
+ HdlLogLogic.print("鍒濆鍖栭�嗗彉鍣ㄥけ璐�-->mac:" + mac + "--->" + e.getMsg() + "(" + e.getCode() + ")", true);
}
});
--
Gitblit v1.8.0