黄学彪
2020-09-01 dee21bf452a8979d0515d13e534fbb69ed9715dd
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceUpdateLogic.cs
@@ -556,11 +556,22 @@
            {
                System.Threading.Thread.Sleep(3000);
                //重新刷新缓存
                HdlDeviceImageInfoLogic.Current.SetAllImageInfoToOtaDevice(otaDevice, (device, reportData) =>
                {
                    this.IsFinishUpdate = true;
                });
                string checkKey = Common.LocalDevice.Current.GetDeviceMainKeys(otaDevice.DeviceAddr, otaDevice.DeviceEpoint);
                HdlGatewayReceiveLogic.Current.AddAttributeEvent("HdlDeviceUpdate" + otaDevice.DeviceAddr, ReceiveComandDiv.A设备属性上报, (report) =>
                 {
                     if (report.DeviceStatusReport.CluterID == (int)Cluster_ID.Ota)
                     {
                         string mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(report.DeviceAddr, report.DeviceEpoint);
                         if (checkKey == mainKey)
                         {
                            //已经接收得到
                            this.IsFinishUpdate = true;
                         }
                     }
                 });
                //发送命令
                HdlDeviceImageInfoLogic.Current.SetFirmwareVersionComand(otaDevice);
                System.Threading.Thread.Sleep(1500);
                int count = 12;
@@ -572,7 +583,7 @@
                    count--;
                }
                //移除事件
                HdlDeviceImageInfoLogic.Current.RemoveDeviceFirmwareVersionThread(otaDevice);
                HdlGatewayReceiveLogic.Current.RemoveEvent("HdlDeviceUpdate");
                //设置进度值直接为100%
                this.ProgressEvent?.Invoke(100);