From 74d51db562aea6e2d8cb8f861a5eeeeb750696fb Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 19 十二月 2023 20:57:47 +0800
Subject: [PATCH] 2023年12月19日20:57:41

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

diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlOtaLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlOtaLogic.java
index 88134a4..e1c7539 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlOtaLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlOtaLogic.java
@@ -7,6 +7,7 @@
 
 
 import com.google.gson.Gson;
+import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
 import com.google.gson.reflect.TypeToken;
 import com.hdl.linkpm.sdk.core.exception.HDLException;
@@ -92,7 +93,7 @@
     /**
      * 鏈嶅姟鏄惁寮�鍚� true=寮�鍚�
      */
-    public boolean mServiceStart = false;
+    public boolean mServiceStart= false;
 
     /**
      * true琛ㄧず缁堟涓嬭浇鍗囩骇鏂囦欢(鐢ㄦ埛琛屼负)
@@ -388,6 +389,7 @@
     public void stopDownloadUpgradeFile() {
         this.stopDownload = true;
     }
+
     /**
      * 鍚戜簯绔幏鍙栥�愯澶囧崌绾ф枃浠�(椹卞姩,鍥轰欢)涓嬭浇銆戝崌绾ф枃浠�
      *
@@ -428,6 +430,7 @@
      */
     public void pushUpgradePacketInfo(String mac, String oid, String module, String version, String size, String url, String sign_method, LinkCallBack<String> linkCallBack) {
         String requestUrl = TopicApi.SET_GATEWAY_UPGRADE_INFO;
+        JsonArray jsonArray = new JsonArray();
         JsonObject json = new JsonObject();
         json.addProperty("oid", oid);// 鐗╃悊璁惧oid
         json.addProperty("module", module);//妯″潡淇℃伅
@@ -435,8 +438,10 @@
 //        json.addProperty("is_diff", is_diff);//true=澧為噺鍖咃紝false=鍏ㄩ噺鍖�
         json.addProperty("size", size);//鍗囩骇鍖呭ぇ灏�
         json.addProperty("url", url);//鍗囩骇鍖呬笅杞藉湴鍧�
-        json.addProperty("sign_method", sign_method);//鍗囩骇鍖呯鍚嶇被鍨�:md5
-        TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, json, "", new HDLLinkCallBack() {
+        json.addProperty("sign", sign_method);//鍗囩骇鍖呯鍚嶇被鍨�:md5
+        json.addProperty("sign_method", "md5");//鍗囩骇鍖呯鍚嶇被鍨�:md5
+        jsonArray.add(json);
+        TcpClient.getInstance().sendDataToLinkGateway(mac, requestUrl, jsonArray, "", new HDLLinkCallBack() {
             @Override
             public void onSuccess(String msg) {
                 if (linkCallBack != null) {

--
Gitblit v1.8.0