From d7ad5a3953a8cd001659092ebde204b881f94b9d Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期四, 31 十月 2019 10:47:13 +0800
Subject: [PATCH] 2019-10-31-1
---
ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs | 282 ++++++++++++++++++++++++++++++++++---------------------
1 files changed, 174 insertions(+), 108 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
old mode 100644
new mode 100755
index 6b7666b..586446e
--- a/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
+++ b/ZigbeeApp/Shared/Phone/Device/AC/ACControl.cs
@@ -14,7 +14,7 @@
///// <summary>
///// The top view.
///// </summary>
- private CommonForm.TopFrameLayout topFL;
+ private CommonForm.TopFrameLayout top;
/// <summary>
/// 鏇村璁剧疆
/// </summary>
@@ -141,33 +141,39 @@
if (deviceUI.CommonDevice.Type == DeviceType.Thermostat)
{
//Thermostat鍔熻兘
- if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 513)
+ if (common.DeviceStatusReport.CluterID == 513)
{
- var attriButeList = (common as ZigBee.Device.AC).DeviceStatusReport.AttriBute;
+ var attriButeList = common.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
return;
}
- ac.DeviceStatusReport = (common as ZigBee.Device.AC).DeviceStatusReport;
+ ac.DeviceStatusReport = common.DeviceStatusReport;
switch (attriButeList[0].AttributeId)
{
case 0:
//姝ゅ睘鎬ц〃鏄庡鍐呭綋鍓嶇殑娓╁害 * 100锛屽疄闄呮俯搴︿负鈥淟ocalTemperature / 100鈥濓紝鍗曚綅锛氣剝
- ac.currentLocalTemperature = attriButeList[0].AttriButeData/100;
+ ac.currentLocalTemperature = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
ac.LastDateTime = DateTime.Now;
indoorTemperatureBtn.Text = $"{Language.StringByID(R.MyInternationalizationString.IndoorTemperature)} {ac.currentLocalTemperature} 鈩�";
- currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} 鈩�";
+ //currentTemperatureBtn.Text = $"{ac.currentLocalTemperature} 鈩�";
break;
case 17:
//姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鍐锋俯搴︼紝瀹為檯娓╁害涓衡�淐oolingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
- ac.currentCoolingSetpoint = attriButeList[0].AttriButeData/100;
+ ac.currentCoolingSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
ac.LastDateTime = DateTime.Now;
break;
case 18:
//姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勫埗鐑俯搴︼紝瀹為檯娓╁害涓衡�淗eatingSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
- ac.currentHeatingSetpoint = attriButeList[0].AttriButeData/100;
+ ac.currentHeatingSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
+ ac.LastDateTime = DateTime.Now;
+ break;
+
+ case 4096:
+ //姝ゅ睘鎬ц〃鏄庢璁惧褰撳墠鐨勮嚜鍔ㄦ俯搴︼紝瀹為檯娓╁害涓衡�淎utoSetpoint / 100鈥濓紝鍗曚綅锛氣剝銆�
+ ac.currentAutoSetpoint = (attriButeList[0].AttriButeData / 100 > ACControlBase.Temperature_High || attriButeList[0].AttriButeData / 100 < ACControlBase.Temperature_Low) ? attriButeList[0].AttriButeData / 100 : ACControlBase.Temperature_Default;
ac.LastDateTime = DateTime.Now;
break;
@@ -191,6 +197,8 @@
modeBtn.SelectedImagePath = ACControlBase.GetModeSelectedImagePathByModeId(ac.currentSystemMode);
modeBtn.UnSelectedImagePath = ACControlBase.GetModeUnSelectedImagePathByModeId(ac.currentSystemMode);
currentModeBtn.Text = ACControlBase.GetModeNameByModeId(ac.currentSystemMode);
+
+ currentTemperatureBtn.Text = $"{ACControlBase.GetCurrentModeTemperature(ac)} 鈩�";
}
break;
}
@@ -198,14 +206,14 @@
}
}
//Fan Control鍔熻兘
- if ((common as ZigBee.Device.AC).DeviceStatusReport.CluterID == 514)
+ if (common.DeviceStatusReport.CluterID == 514)
{
- var attriButeList = (common as ZigBee.Device.AC).DeviceStatusReport.AttriBute;
+ var attriButeList = common.DeviceStatusReport.AttriBute;
if (attriButeList == null || attriButeList.Count == 0)
{
return;
}
- ac.DeviceStatusReport = (common as ZigBee.Device.AC).DeviceStatusReport;
+ ac.DeviceStatusReport = common.DeviceStatusReport;
switch (attriButeList[0].AttributeId)
{
case 0:
@@ -255,7 +263,6 @@
{
ac = deviceUI.CommonDevice as ZigBee.Device.AC;
ac.IsOnline = (common as DimmableLight).IsOnline;
- //deviceIMG.IsSelected = light.IsOnline == 1;
ac.LastDateTime = DateTime.Now;
}
}
@@ -323,11 +330,12 @@
UserView.UserHomeView.ReadStatus(ac, () =>
{
ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
- ac.ReadFanMode();
- ac.ReadSystemMode();
ac.ReadLocalTemperature();
ac.ReadCoolingSetpoint();
ac.ReadHeatingSetpoint();
+ ac.ReadAutoSetpoint();
+ ac.ReadFanMode();
+ ac.ReadSystemMode();
});
}
else
@@ -336,11 +344,12 @@
if ((DateTime.Now - ac.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
{
ac.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
- ac.ReadFanMode();
- ac.ReadSystemMode();
ac.ReadLocalTemperature();
ac.ReadCoolingSetpoint();
ac.ReadHeatingSetpoint();
+ ac.ReadAutoSetpoint();
+ ac.ReadFanMode();
+ ac.ReadSystemMode();
}
}
@@ -385,8 +394,13 @@
/// </summary>
private void AddTopView()
{
- topFL = new CommonForm.TopFrameLayout(this) { };
- AddChidren(topFL);
+ top = new CommonForm.TopFrameLayout();
+ AddChidren(top);
+ top.InitTopview();
+ top.backButton.MouseUpEventHandler += (sender, e) =>
+ {
+ RemoveFromParent();
+ };
AddMoreview();
}
@@ -405,8 +419,7 @@
UnSelectedImagePath = "Item/More.png",
SelectedImagePath = "Item/MoreSelected.png",
};
- topFL.topView.AddChidren(moreBtn);
- moreBtn.MouseUpEventHandler += MoreEvent;
+ top.topView.AddChidren(moreBtn);
}
/// <summary>
@@ -438,7 +451,7 @@
midFL = new FrameLayout()
{
Height = Application.GetRealHeight(CommonPage.AppRealHeight - CommonPage.Navigation_Height),
- Y = topFL.Bottom,
+ Y = top.Bottom,
BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor
};
AddChidren(midFL);
@@ -490,7 +503,7 @@
{
Y = Application.GetRealHeight(50),
Height = Application.GetRealHeight(80),
- Width = Application.GetRealWidth(300),
+ Width = Application.GetRealWidth(600),
Gravity = Gravity.CenterHorizontal,
Text=device.CommonDevice.DeviceEpointName,
TextSize=15,
@@ -664,42 +677,31 @@
fanModeDialog.Close();
};
- //var downTriangleBtn = new Button()
- //{
- // X = Application.GetRealWidth(20) + fanModeBtn.X,
- // Y = fanModeBtn.Y-Application.GetRealHeight(217),
- // Width = Application.GetMinRealAverage(30),
- // Height = Application.GetMinRealAverage(15),
- // UnSelectedImagePath = "Item/UpperTriangle.png"
- //};
- //closeBGview.AddChidren(downTriangleBtn);
-
- //var changeFanModeBG = new Button()
- //{
- // X = Application.GetRealWidth(553),
- // Y = Application.GetRealHeight(605),
- // Height = Application.GetRealHeight(625),
- // Width = Application.GetRealWidth(fanItem_Width),
- // SelectedImagePath="AC/SelectedFanModeBG.png"
- //};
- //closeBGview.AddChidren(changeFanModeBG);
+ var changeFanModeBG = new Button()
+ {
+ X = Application.GetRealWidth(553),
+ Y = Application.GetRealHeight(655),
+ Height = Application.GetRealHeight(625),
+ Width = Application.GetRealWidth(fanItem_Width),
+ UnSelectedImagePath = "AC/SelectedFanModeBG.png"
+ };
+ closeBGview.AddChidren(changeFanModeBG);
var changeFanModeFL = new FrameLayout()
{
X = Application.GetRealWidth(553),
- Y = Application.GetRealHeight(605),
- Height = Application.GetRealHeight(625),
+ Y = Application.GetRealHeight(655),
+ Height = Application.GetRealHeight(600),
Width = Application.GetRealWidth(fanItem_Width),
Radius = CommonPage.BigFormRadius,
BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
- //BackgroundImagePath="AC/SelectedFanModeBG.png"
};
closeBGview.AddChidren(changeFanModeFL);
var changeFanBtn = new Button()
{
X = Application.GetRealWidth(fanItem_X),
- Width = Application.GetRealWidth(fanItem_Width- fanItem_X),
+ Width = Application.GetRealWidth(fanItem_Width - fanItem_X),
Height = Application.GetRealHeight(fanItem_Height),
TextColor = ZigbeeColor.Current.GXCTextBlackColor,
TextID = R.MyInternationalizationString.SelectFanMode,
@@ -707,17 +709,17 @@
};
changeFanModeFL.AddChidren(changeFanBtn);
- var fan_Low = new CommonForm.LeftIconButtonRowLayout()
+ var fan_Low = new CommonForm.ACLeftIconButtonRowLayout()
{
- Y=changeFanBtn.Bottom,
+ Y = changeFanBtn.Bottom,
Width = Application.GetRealWidth(fanItem_Width),
Height = Application.GetRealHeight(fanItem_Height),
- Tag=ZigBee.Device.AC.FanMode.Low
+ Tag = ZigBee.Device.AC.FanMode.Low
};
changeFanModeFL.AddChidren(fan_Low);
fan_Low.Init("AC/Fan_Low.png", "AC/Fan_LowSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Low));
- var fan_Middle = new CommonForm.LeftIconButtonRowLayout()
+ var fan_Middle = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = fan_Low.Bottom,
Width = Application.GetRealWidth(fanItem_Width),
@@ -727,7 +729,7 @@
changeFanModeFL.AddChidren(fan_Middle);
fan_Middle.Init("AC/Fan_Middle.png", "AC/Fan_MiddleSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Middle));
- var fan_Height = new CommonForm.LeftIconButtonRowLayout()
+ var fan_Height = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = fan_Middle.Bottom,
Width = Application.GetRealWidth(fanItem_Width),
@@ -735,17 +737,32 @@
Tag = ZigBee.Device.AC.FanMode.High
};
changeFanModeFL.AddChidren(fan_Height);
- fan_Height.Init("AC/Fan_Height.png", "AC/Fan_HeightSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Height));
+ fan_Height.Init("AC/Fan_Height.png", "AC/Fan_HeightSelected.png", Language.StringByID(R.MyInternationalizationString.Fan_Height), false);
- //fan_Low.MouseUpEventHandler += ChangeFan_MouseUpEvent;
- fan_Low.titleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
- fan_Low.iconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+ fan_Low.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+ fan_Low.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
- fan_Middle.titleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
- fan_Middle.iconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+ fan_Middle.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+ fan_Middle.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
- fan_Height.titleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
- fan_Height.iconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+ fan_Height.TitleButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+ fan_Height.IconButton.MouseUpEventHandler += ChangeFan_MouseUpEvent;
+
+ if (ACControlBase.IsOpen(ac))
+ {
+ if (ac.currentFanMode == 1)
+ {
+ fan_Low.SetSelectedStatu();
+ }
+ else if (ac.currentFanMode == 2)
+ {
+ fan_Middle.SetSelectedStatu();
+ }
+ else if (ac.currentFanMode == 3)
+ {
+ fan_Height.SetSelectedStatu();
+ }
+ }
}
/// <summary>
@@ -816,38 +833,27 @@
acModeDialog.Close();
};
- //var changeModeBG = new Button()
- //{
- // X = Application.GetRealWidth(80),
- // Y = Application.GetRealHeight(360),
- // Height = Application.GetRealHeight(933),
- // Width = Application.GetRealWidth(modeItem_Width),
- // //Radius = CommonPage.BigFormRadius,
- // SelectedImagePath = "AC/SelectedModeBG.png"
- //};
- //closeBGview.AddChidren(changeModeBG);
-
- var changeModeFL = new FrameLayout()
+ var changeModeBG = new Button()
{
X = Application.GetRealWidth(80),
Y = Application.GetRealHeight(360),
Height = Application.GetRealHeight(933),
Width = Application.GetRealWidth(modeItem_Width),
+ UnSelectedImagePath = "AC/SelectedModeBG.png"
+ };
+ closeBGview.AddChidren(changeModeBG);
+
+ var changeModeFL = new FrameLayout()
+ {
+ X = Application.GetRealWidth(80),
+ Y = Application.GetRealHeight(360),
+ Height = Application.GetRealHeight(900),
+ Width = Application.GetRealWidth(modeItem_Width),
Radius = CommonPage.BigFormRadius,
BackgroundColor = ZigbeeColor.Current.GXCBackgroundColor,
- //BackgroundImagePath="AC/SelectedModeBG.png"
+ //BackgroundIagePath="AC/SelectedModeBG.png"
};
closeBGview.AddChidren(changeModeFL);
-
- var changeModeBG = new Button()
- {
- Height = Application.GetRealHeight(933),
- Width = Application.GetRealWidth(modeItem_Width),
- //Radius = CommonPage.BigFormRadius,
- SelectedImagePath = "AC/SelectedModeBG.png"
- };
- changeModeFL.AddChidren(changeModeBG);
-
var changeModeBtn = new Button()
{
@@ -860,7 +866,7 @@
};
changeModeFL.AddChidren(changeModeBtn);
- var mode_Auto = new CommonForm.LeftIconButtonRowLayout()
+ var mode_Auto = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = changeModeBtn.Bottom,
Width = Application.GetRealWidth(modeItem_Width),
@@ -870,7 +876,7 @@
changeModeFL.AddChidren(mode_Auto);
mode_Auto.Init("AC/Mode_Auto.png", "AC/Mode_AutoSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Auto));
- var mode_Cool = new CommonForm.LeftIconButtonRowLayout()
+ var mode_Cool = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = mode_Auto.Bottom,
Width = Application.GetRealWidth(modeItem_Width),
@@ -880,7 +886,7 @@
changeModeFL.AddChidren(mode_Cool);
mode_Cool.Init("AC/Mode_Cool.png", "AC/Mode_CoolSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Cool));
- var mode_Heat = new CommonForm.LeftIconButtonRowLayout()
+ var mode_Heat = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = mode_Cool.Bottom,
Width = Application.GetRealWidth(modeItem_Width),
@@ -890,7 +896,7 @@
changeModeFL.AddChidren(mode_Heat);
mode_Heat.Init("AC/Mode_Heat.png", "AC/Mode_HeatSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Heat));
- var mode_Dry = new CommonForm.LeftIconButtonRowLayout()
+ var mode_Dry = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = mode_Heat.Bottom,
Width = Application.GetRealWidth(modeItem_Width),
@@ -900,7 +906,7 @@
changeModeFL.AddChidren(mode_Dry);
mode_Dry.Init("AC/Mode_Dry.png", "AC/Mode_DrySelected.png", Language.StringByID(R.MyInternationalizationString.Mode_Dry));
- var mode_Fan = new CommonForm.LeftIconButtonRowLayout()
+ var mode_Fan = new CommonForm.ACLeftIconButtonRowLayout()
{
Y = mode_Dry.Bottom,
Width = Application.GetRealWidth(modeItem_Width),
@@ -908,23 +914,46 @@
Tag = ZigBee.Device.AC.AcMode.FanOnly
};
changeModeFL.AddChidren(mode_Fan);
- mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly));
+ mode_Fan.Init("AC/Mode_Fan.png", "AC/Mode_FanSelected.png", Language.StringByID(R.MyInternationalizationString.Mode_FanOnly), false);
- mode_Auto.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Auto.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Auto.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Auto.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Cool.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Cool.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Cool.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Cool.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Heat.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Heat.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Heat.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Heat.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Dry.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Dry.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Dry.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Dry.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Fan.titleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
- mode_Fan.iconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Fan.TitleButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ mode_Fan.IconButton.MouseUpEventHandler += ChangeMode_MouseUpEvent;
+ if (ACControlBase.IsOpen(ac))
+ {
+ if (ac.currentSystemMode == 1)
+ {
+ mode_Auto.SetSelectedStatu();
+ }
+ else if (ac.currentSystemMode == 3)
+ {
+ mode_Cool.SetSelectedStatu();
+ }
+ else if (ac.currentSystemMode == 4)
+ {
+ mode_Heat.SetSelectedStatu();
+ }
+ else if (ac.currentSystemMode == 8)
+ {
+ mode_Dry.SetSelectedStatu();
+ }
+ else if (ac.currentSystemMode == 7)
+ {
+ mode_Fan.SetSelectedStatu();
+ }
+ }
}
/// <summary>
@@ -1023,22 +1052,41 @@
ACControlBase.ShowACIsCloseTip();
return;
}
- //cool
- if (ac.currentSystemMode == 3)
+ //cool //dry
+ if (ac.currentSystemMode == 3 || ac.currentSystemMode==8)
{
+ if(ac.currentCoolingSetpoint>=ACControlBase.Temperature_High)
+ {
+ return;
+ }
ac.currentCoolingSetpoint += 1;
- ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint);
+ ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint*100);
currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
}
//heat
else if (ac.currentSystemMode == 4)
{
+ if(ac.currentHeatingSetpoint>=ACControlBase.Temperature_High)
+ {
+ return;
+ }
ac.currentHeatingSetpoint += 1;
- ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint);
+ ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint*100);
currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
}
//auto
- //dry
+ else if (ac.currentSystemMode == 1)
+ {
+ if (ac.currentAutoSetpoint >= ACControlBase.Temperature_High)
+ {
+ return;
+ }
+ ac.currentAutoSetpoint += 1;
+ ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint*100);
+ currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+ }
+
+
}
#endregion
@@ -1057,24 +1105,43 @@
ACControlBase.ShowACIsCloseTip();
return;
}
- //cool
- if (ac.currentSystemMode == 3)
+ //cool //dry
+ if (ac.currentSystemMode == 3 || ac.currentSystemMode == 8)
{
+ if (ac.currentCoolingSetpoint <= ACControlBase.Temperature_Low)
+ {
+ return;
+ }
ac.currentCoolingSetpoint -= 1;
- ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint);
+ ac.SetCoolingTemperatureAsync(ac.currentCoolingSetpoint*100);
currentTemperatureBtn.Text = $"{ac.currentCoolingSetpoint} 掳C";
}
//heat
else if (ac.currentSystemMode == 4)
{
+ if (ac.currentHeatingSetpoint <= ACControlBase.Temperature_Low)
+ {
+ return;
+ }
ac.currentHeatingSetpoint -= 1;
- ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint);
+ ac.SetHeatingTemperatureAsync(ac.currentHeatingSetpoint*100);
currentTemperatureBtn.Text = $"{ac.currentHeatingSetpoint} 掳C";
}
//auto
- //dry
+ else if (ac.currentSystemMode == 1)
+ {
+ if (ac.currentAutoSetpoint <= ACControlBase.Temperature_Low)
+ {
+ return;
+ }
+ ac.currentAutoSetpoint -= 1;
+ ac.SetAutoTemperatureAsync(ac.currentAutoSetpoint*100);
+
+ currentTemperatureBtn.Text = $"{ac.currentAutoSetpoint} 掳C";
+ }
+
}
#endregion
@@ -1098,7 +1165,6 @@
Shared.Common.Room.Lists[0].AddDevice(device.FileName);
collectionBtn.IsSelected = true;
}
- action?.Invoke();
}
#endregion
--
Gitblit v1.8.0