From f14dcfd967404e197e7ec995ca8d6f2b090d3b7d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 11 九月 2020 09:16:59 +0800 Subject: [PATCH] 优化多功能面板:绑定温湿度传感器目标,和设备列表回路显示。优化数据矫正功能温湿度度不设置的情况。优化门锁时间设置最后一天和最后最后一个月的时间显示等 细节 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs | 45 +++++++++++++++++++-------------------------- 1 files changed, 19 insertions(+), 26 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs index 44249b0..81fd930 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayUpdateLogic.cs @@ -9,7 +9,7 @@ /// <summary> /// 缃戝叧鐨勫崌绾ч�昏緫 /// </summary> - public class HdlGatewayUpdateLogic + public class HdlGatewayUpdateLogic : HdlDeviceUpdateCommonLogic { #region 鈻� 鍙橀噺澹版槑___________________________ @@ -38,14 +38,6 @@ /// 缃戝叧鏂扮増鏈殑鍥轰欢淇℃伅 /// </summary> public FirmwareVersionInfo gatewayFirmware = null; - /// <summary> - /// 褰撳墠鎵ц鐘舵��(鍑虹幇閿欒鏃�,瀹冧篃浼氬彉鎴恡rue) - /// </summary> - public UpdateStatuMode UpdateStatu = UpdateStatuMode.None; - /// <summary> - /// 鍗囩骇鏄惁瀹屾垚 - /// </summary> - public bool IsFinishUpdate = true; /// <summary> /// 鍓嶄竴娆$殑鏈�缁堢姸鎬� @@ -71,6 +63,7 @@ public HdlGatewayUpdateLogic(ZbGateway zbGateway, FirmwareVersionInfo i_virtualFirmware, FirmwareVersionInfo i_coordinatorFirmware, FirmwareVersionInfo i_gatewayFirmware) { + this.ClassDiv = 1; this.upDatezbGateway = zbGateway; this.virtualFirmware = i_virtualFirmware; this.coordinatorFirmware = i_coordinatorFirmware; @@ -89,10 +82,10 @@ if (this.UpdateStatu == UpdateStatuMode.Wait) { //濡傛灉鏄瓑寰呮ā寮忥紝鍐嶆鐐瑰嚮鏃讹紝绉婚櫎鍒楄〃 - string gwId = HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway); - if (FirmwareUpdateResourse.dicGatewayUpdateList.ContainsKey(gwId) == true) + string gwId = this.upDatezbGateway.GwId; + if (FirmwareUpdateResourse.dicUpdateList.ContainsKey(gwId) == true) { - FirmwareUpdateResourse.dicGatewayUpdateList.Remove(gwId); + FirmwareUpdateResourse.dicUpdateList.Remove(gwId); } this.UpdateStatu = UpdateStatuMode.None; //鍙栨秷 @@ -108,8 +101,8 @@ //杩涘叆绛夊緟妯″紡 this.UpdateStatu = UpdateStatuMode.Wait; - string gwId2 = HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway); - FirmwareUpdateResourse.dicGatewayUpdateList[gwId2] = this; + string gwId2 = this.upDatezbGateway.GwId; + FirmwareUpdateResourse.dicUpdateList[gwId2] = this; //绛夊緟涓�� this.UpdateStatuChangedEvent?.Invoke(0, Language.StringByID(R.MyInternationalizationString.uWaitting)); @@ -120,7 +113,7 @@ /// <summary> /// 寮�濮嬫墽琛屾洿鏂版搷浣�(FirmwareUpdateLogic璋冪敤) /// </summary> - public void DoStartUpdate() + public override void DoStartUpdate() { //鐘舵�佸彉鏇� this.IsFinishUpdate = false; @@ -247,7 +240,7 @@ return; } var tempZb = (ZbGateway)objValue; - if (tempZb.CurrentGateWayId != HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway)) + if (tempZb.GwId != this.upDatezbGateway.GwId) { //涓嶆槸鑷繁鐨勭綉鍏虫帹閫侊紝鍒欎笉澶勭悊 return; @@ -350,7 +343,7 @@ return; } var tempZb = (ZbGateway)objValue; - if (tempZb.CurrentGateWayId != HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway)) + if (tempZb.GwId != this.upDatezbGateway.GwId) { //涓嶆槸鑷繁鐨勭綉鍏虫帹閫侊紝鍒欎笉澶勭悊 return; @@ -452,7 +445,7 @@ return; } var tempZb = (ZbGateway)objValue; - if (tempZb.CurrentGateWayId != HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway)) + if (tempZb.GwId != this.upDatezbGateway.GwId) { //涓嶆槸鑷繁鐨勭綉鍏虫帹閫侊紝鍒欎笉澶勭悊 return; @@ -550,7 +543,7 @@ } var tempZb = (ZbGateway)objValue; - if (tempZb.CurrentGateWayId != HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway)) + if (tempZb.GwId != this.upDatezbGateway.GwId) { //涓嶆槸鑷繁鐨勭綉鍏虫帹閫侊紝鍒欎笉澶勭悊 return; @@ -650,7 +643,7 @@ return; } var tempZb = (ZbGateway)objValue; - if (tempZb.CurrentGateWayId != HdlGatewayLogic.Current.GetGatewayId(this.upDatezbGateway)) + if (tempZb.GwId != this.upDatezbGateway.GwId) { //涓嶆槸鑷繁鐨勭綉鍏虫帹閫侊紝鍒欎笉澶勭悊 return; @@ -961,7 +954,7 @@ //缃戝叧鍗囩骇 timeCount += 50; //缃戝叧閲嶅惎 - timeCount += 180; + timeCount += 250; } return timeCount; } @@ -984,7 +977,7 @@ /// <returns></returns> private void StartGetGatewayVersionThread() { - HdlThreadLogic.Current.RunThread(async () => + HdlThreadLogic.Current.RunThread(() => { //鍏堢瓑涓�120绉掑惂锛岀綉鍏冲崌绾у拰缃戝叧瀹屽叏閲嶅惎闇�瑕佸緢闀挎椂闂� int count = 12; @@ -998,12 +991,12 @@ //杩欎釜鏃跺�欙紝涓嶅簲璇ユ彁绀鸿秴鏃� this.UpdateTimeOutRefresh(); - await Task.Delay(10000); + System.Threading.Thread.Sleep(10000); } while (this.IsFinishUpdate == false) { //鑾峰彇鐗堟湰 - var result = await HdlGatewayLogic.Current.GetGatewayNewInfoAsync(this.upDatezbGateway, ShowErrorMode.NO); + var result = HdlGatewayLogic.Current.GetGatewayInfo(this.upDatezbGateway, false, ShowErrorMode.NO); if (result != null) { break; @@ -1011,7 +1004,7 @@ //杩欎釜鏃跺�欙紝涓嶅簲璇ユ彁绀鸿秴鏃� this.UpdateTimeOutRefresh(); - await Task.Delay(5000); + System.Threading.Thread.Sleep(5000); } //宸茬粡鑳藉鑾峰彇鏁版嵁 this.ShowFinishMsg(); @@ -1025,7 +1018,7 @@ /// <summary> /// 閲婃斁缂撳瓨 /// </summary> - public void Dispose() + public override void Dispose() { this.ProgressEvent = null; this.UpdateStatuChangedEvent = null; -- Gitblit v1.8.0