修改温度控制功能
This commit is contained in:
parent
68d441eb0d
commit
f7734fc71e
|
|
@ -325,6 +325,7 @@
|
||||||
{
|
{
|
||||||
if (backmodel) {
|
if (backmodel) {
|
||||||
_wenduPicview=[[HaveHotCoolWenDuPicview alloc] init];
|
_wenduPicview=[[HaveHotCoolWenDuPicview alloc] init];
|
||||||
|
_wenduPicview.cateSwich.hidden = YES;
|
||||||
_wenduPicview.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height);
|
_wenduPicview.frame=CGRectMake(0, 0, kScreenSize.width, kScreenSize.height);
|
||||||
[_wenduPicview.sureBtn addTarget:self action:@selector(sureBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
[_wenduPicview.sureBtn addTarget:self action:@selector(sureBtnClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||||
|
|
||||||
|
|
@ -498,18 +499,9 @@
|
||||||
_backmodel.heatStickState = @"00";
|
_backmodel.heatStickState = @"00";
|
||||||
}
|
}
|
||||||
NSString*stateString=[_backmodel.heatStickState substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)];
|
NSString*stateString=[_backmodel.heatStickState substringWithRange:NSMakeRange(0, IFISH_LIGHTBTN_BYTE)];
|
||||||
if ([stateString isEqualToString:@"00"]) {
|
|
||||||
//00加热
|
self.hotcolLabe.text = [NSString stringWithFormat:@"-室内温度-"];
|
||||||
self.hotcolLabe.text = [NSString stringWithFormat:@"-加热-"];
|
self.hotcolLabe.textColor = JWUIColorFromRGB(0x38b9fc);
|
||||||
self.hotcolLabe.textColor = JWUIColorFromRGB(0xfc6638);
|
|
||||||
|
|
||||||
|
|
||||||
}else{
|
|
||||||
//01制冷
|
|
||||||
self.hotcolLabe.text = [NSString stringWithFormat:@"-室内温度-"];
|
|
||||||
self.hotcolLabe.textColor = JWUIColorFromRGB(0x38b9fc);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_backmodel.heatStickState) {
|
if (!_backmodel.heatStickState) {
|
||||||
_backmodel.heatStickState = @"00";
|
_backmodel.heatStickState = @"00";
|
||||||
|
|
@ -583,23 +575,23 @@
|
||||||
}
|
}
|
||||||
#pragma mark - 制冷制热指令
|
#pragma mark - 制冷制热指令
|
||||||
-(void)didSelectCoolOrHeat:(NSString *)hotCool{
|
-(void)didSelectCoolOrHeat:(NSString *)hotCool{
|
||||||
//由s5 控制 原理同灯
|
// //由s5 控制 原理同灯
|
||||||
RuSunLightOrder*lightOrder=[[RuSunLightOrder alloc]init];
|
// RuSunLightOrder*lightOrder=[[RuSunLightOrder alloc]init];
|
||||||
lightOrder.sendmacId = self.currentDevice.macAddress;
|
// lightOrder.sendmacId = self.currentDevice.macAddress;
|
||||||
lightOrder.resavemacId = self.currentDevice.macAddress;
|
// lightOrder.resavemacId = self.currentDevice.macAddress;
|
||||||
NSString*switchString1=lightOrder.description;
|
// NSString*switchString1=lightOrder.description;
|
||||||
lightOrder.switchBtn = hotCool;
|
// lightOrder.switchBtn = hotCool;
|
||||||
lightOrder.crc16Str=@"0000";
|
// lightOrder.crc16Str=@"0000";
|
||||||
lightOrder.lightNumber=@"05";
|
// lightOrder.lightNumber=@"05";
|
||||||
|
//
|
||||||
NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString1,lightOrder.lightNumber,lightOrder.switchBtn,lightOrder.crc16Str];
|
// NSString*switchString2=[NSString stringWithFormat:@"%@%@%@%@",switchString1,lightOrder.lightNumber,lightOrder.switchBtn,lightOrder.crc16Str];
|
||||||
NSData*manulData=[dataContorl stringToHexData:switchString2];
|
// NSData*manulData=[dataContorl stringToHexData:switchString2];
|
||||||
[ [Socketsingleton sharedInstance] soketWriteData:manulData];
|
// [ [Socketsingleton sharedInstance] soketWriteData:manulData];
|
||||||
if ([Socketsingleton sharedInstance].clientSocket.isConnected) {
|
// if ([Socketsingleton sharedInstance].clientSocket.isConnected) {
|
||||||
//soket 未断开时显示
|
// //soket 未断开时显示
|
||||||
[self initHUD];
|
// [self initHUD];
|
||||||
[self.myhud myhudstart];
|
// [self.myhud myhudstart];
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue