From 5e080d063f213f2b2c2ed34e1d54b9fd7df1c6b0 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 23 十一月 2023 19:28:47 +0800
Subject: [PATCH] 2023年11月23日19:28:37
---
app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java | 71 +++++++++++++++++++++++++++++++++++
1 files changed, 70 insertions(+), 1 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java b/app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java
index 1706fa8..771e5b0 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/MyPowerStationActivity.java
@@ -83,7 +83,7 @@
//鍒濆鍖杕qtt瀹㈡埛绔�
initMqttClient();
-
+// dddd();
}
@@ -354,7 +354,76 @@
}
+ private void dddd() {
+// String drivePathFileName = HdlFileLogic.getInstance().getDrivePathFileName("036F6C1B", "V01.01.02");
+// String data = HdlFileLogic.getInstance().readFile(drivePathFileName);
+// String md5 = HDLMD5Utils.encodeMD5(data);//缃戝叧椹卞姩闇�瑕�
+// Log.e("", md5);
+// HdlOtaLogic.getInstance().getDeviceDriverDownloadFile("http://192.168.16.135:49152/storage/emulated/0/Android/data/com.hdl.photovoltaic/files/Documents/upgrade/drive/036F6C1B_V01.01.02.zip", new CloudCallBeak<ResponseBody>() {
+// @Override
+// public void onSuccess(ResponseBody responseBody) {
+//
+// HdlOtaLogic.getInstance().disposeDownLoadFile(drivePathFileName, responseBody, md5);
+//
+//// //鏈湴鍗囩骇椹卞姩鏂囦欢璺緞
+////
+//// String data = HdlFileLogic.getInstance().readFile(drivePathFileName);
+//// String md5 = HDLMD5Utils.encodeMD5(data);//缃戝叧椹卞姩闇�瑕�
+// }
+//
+// @Override
+// public void onFailure(HDLException e) {
+//
+// }
+// });
+// HdlOtaLogic.getInstance().getNewGatewayDrivers("036F6C1B", "A000", new CloudCallBeak<CloudGatewayDriversBean>() {
+// @Override
+// public void onSuccess(CloudGatewayDriversBean obj) {
+//
+// }
+//
+// @Override
+// public void onFailure(HDLException e) {
+//
+// }
+// });
+
+
+// dowlao();
+ HdlOtaLogic.getInstance().startLocalService(new ServiceConnection() {
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+
+ }
+ });
+
+ }
+
+ void dowlao() {
+
+ HdlOtaLogic.getInstance().getDeviceDriverDownloadFile("http://hdl-hz-test.oss-cn-hangzhou.aliyuncs.com/20/2023/11/1834a1d0-d2a7-4b6f-9877-6f2722e9b7bc.hdlipk_sec", new CloudCallBeak<ResponseBody>() {
+ @Override
+ public void onSuccess(ResponseBody responseBody) {
+ String drivePathFileName = HdlFileLogic.getInstance().getDrivePathFileName("036F6C1B", "V01.01.02");
+ HdlOtaLogic.getInstance().disposeDownLoadFile(drivePathFileName, responseBody, "84cd8e62d4311c90508313f0e5965dbb", HdlOtaLogic.driver_type);
+
+// HdlFileLogic.getInstance().writeFile(drivePathFileName, bytes);//鍐欏叆鏂版枃浠�
+ HdlLogLogic.print("鍐欏叆鏂伴┍鍔ㄦ枃浠跺埌鍐呭瓨鎴愬姛.", false);
+ }
+
+ @Override
+ public void onFailure(HDLException e) {
+ HdlLogLogic.print("涓嬭浇椹卞姩鏂囦欢鍒板唴瀛樺け璐�.", false);
+ }
+ });
+ }
+
}
\ No newline at end of file
--
Gitblit v1.8.0