联系我们字体修改和关联宠物笼的设置问题修改

This commit is contained in:
kai60
2020-06-28 18:07:46 +08:00
parent 5cfacf22d4
commit 196f47005e
7 changed files with 178 additions and 82 deletions
@@ -31,11 +31,13 @@
#import "RuiMeiCHControl.h"
#import "Xuanduo2DataUtility.h"
#import "NSString+Add.h"
#import "Xuanduo2TimerModel.h"
#define ktempTag 600
@implementation MonitorBootmView
{
NSTimer *_switchTimer;
XuanduoCycleModel * _cycleModel;
}
-(id)initWithFrame:(CGRect)frame
@@ -960,7 +962,7 @@
[self makeToast:@"暂未连接"];
return;
}
if (indexPath.row == 10 || indexPath.row == 3) {
if (indexPath.row == 10 || (indexPath.row == 3&&[self.device.type isEqualToString:DECICE_TYPE_XUANDUO2F])) {
//点击加热棒
[self.MonitorBottomDelegate selectXuanduo2Index:indexPath withBackModel:_xuanduoBack];
}else{
@@ -1736,7 +1738,12 @@
-(void)ifishDeviceLogInSuccees{
if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
[self readCycleWithNumber:@"03"];
}
}
@@ -1750,7 +1757,20 @@
}
-(void)readCycleWithNumber:(NSString*)num
{
baseModel*readModel=[[baseModel alloc]init];
readModel.sendmacId =self.device.macAddress;
readModel.resavemacId =self.device.macAddress;
readModel.functionCode=@"19";
readModel.massagelegth=@"12";
NSString*readString=[NSString stringWithFormat:@"%@%@%@",readModel.description,num,@"0000"];
NSData*readData=[dataContorl stringToHexData:readString];
[[Socketsingleton sharedInstance] soketWriteData:readData];
}
-(void)judgeBackamsgTaypeWith:(DeviceModel *)devicemoel addData:(NSData *)data{
[self hideToastActivity];
@@ -1854,12 +1874,54 @@
[self.collectionView reloadData];
}else if ([self.device.type isEqualToString:DECICE_TYPE_XUANDUO3F]){
// 新绚多
if (!_xuanduoBack) {
_xuanduoBack = [[Xuanduo3fModel alloc] init];
NSString*string1=[dataContorl dataToHexString:data];
NSString *readTimer = [string1 substringToIndex:4];
if ([readTimer isEqualToString:@"0119"])
{
_cycleModel=[[XuanduoCycleModel alloc]init];
[Xuanduo2DataUtility readCycleSocketDataWithBackMsgModel:_cycleModel addWithBackStr:string1 type:self.device.type];
if (_cycleModel.lastTime.length)
{
UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime];
//float TPlabel=mac/10+(mac%10)*0.1;
float temp1 = mac1;
NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1];
UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"];
uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
UIImage*uvsel=[UIImage imageNamed:@"杀菌开"];
uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
}
}
[Xuanduo2DataUtility readSocketDataWithBackMsgModel:_xuanduoBack addWithBackData:data type:self.device.type];
self.temperature = [BootomViewSoketBackMasgConreol getTempNewWayWithSoketData:data adddeviceType:DECICE_TYPE_XUANDUO3F];
[self.collectionView reloadData];
else
{
if (!_xuanduoBack) {
_xuanduoBack = [[Xuanduo3fModel alloc] init];
}
[Xuanduo2DataUtility readSocketDataWithBackMsgModel:_xuanduoBack addWithBackData:data type:self.device.type];
self.temperature = [BootomViewSoketBackMasgConreol getTempNewWayWithSoketData:data adddeviceType:DECICE_TYPE_XUANDUO3F];
Xuanduo3fModel*model=_xuanduoBack;
//没开的时候取设置的时间
if ([model.vuPHstatus isEqualToString:@"0000"]&&_cycleModel.lastTime)
{
model.vuPHstatus=_cycleModel.lastTime;
}
[self.collectionView reloadData];
}
}
else{