mac
2023-12-15 8087a7d587c9bc3a448e4421bc604f3e71f181a3
app/src/main/java/com/hdl/photovoltaic/other/HdlOtaLogic.java
@@ -14,7 +14,6 @@
import com.hdl.linkpm.sdk.ota.bean.CloudDeviceFirmwaresBean;
import com.hdl.linkpm.sdk.ota.bean.CloudGatewayDriversBean;
import com.hdl.linkpm.sdk.ota.bean.DeviceFirmwareBean;
import com.hdl.linkpm.sdk.ota.bean.DownloadUrlBean;
import com.hdl.linkpm.sdk.ota.bean.GatewayDriverBean;
import com.hdl.photovoltaic.HDLApp;
import com.hdl.photovoltaic.config.UserConfigManage;
@@ -30,7 +29,6 @@
import com.hdl.photovoltaic.utils.AppManagerUtils;
import com.hdl.photovoltaic.utils.Md5Utils;
import com.hdl.sdk.link.common.exception.HDLLinkException;
import com.hdl.sdk.link.common.utils.ByteUtils;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import com.hdl.sdk.link.core.callback.HDLLinkCallBack;
@@ -590,7 +588,7 @@
                    fos.flush();
                    fos.close();
                    is.close();
                    //todo 用户终止家继续读取数据;
                    //todo 用户终止继续读取数据;
                    return false;
                }
                fos.write(buf, 0, len);
@@ -641,8 +639,10 @@
     * @param describe      描述文本
     */
    public void eventBusPost(String fileFullPath, String type, int progressValue, String describe) {
        HdlLogLogic.print("进度值====" + progressValue + "");
        if (this.stopDownload) {
            HdlFileLogic.getInstance().deleteFile(fileFullPath);//删除下载不完成数据;
            HdlFileLogic.getInstance().deleteFile(fileFullPath);//删除下载不完整数据;
            BaseEventBus baseEventBus = new BaseEventBus();
            baseEventBus.setTopic(localDownloadProgress);
            Progress progress = new Progress();
@@ -661,11 +661,14 @@
        Progress progress = new Progress();
        progress.step = progressValue;
        progress.describe = describe;
        progress.type = type;
        baseEventBus.setType(type);
        baseEventBus.setData(progress);
        EventBus.getDefault().post(baseEventBus);
//            }
//        });
    }
@@ -680,6 +683,8 @@
        public int step;
        //进度描述信息
        public String describe;
        //表示是驱动,固件;
        public String type;
    }