From 30a4fdaecacb9288ca0428a85f20235bd4b42c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9D=E5=8F=91=E5=86=AC?= Date: Sat, 10 Sep 2022 22:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=92=8C=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E5=96=82=E9=B1=BC=E6=9C=AA=E5=85=B3=E8=81=94=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ifish.xcodeproj/project.pbxproj | 4 ++-- .../XuTo/Xuanduo2fController.m | 6 +++--- .../XuTo/XuanduoTempratueCorrectViewController.m | 2 +- .../XuTo/XuanduoTimerSettingViewController.m | 12 ++++++++++-- .../XuTo/XuanduofishFeedViewController.m | 6 +++++- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index b53bba4..ba955c9 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -16025,7 +16025,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; @@ -16144,7 +16144,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m index 94baca1..84731cd 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m @@ -359,9 +359,9 @@ self.fishFeedModel=fishFeedModel; NSString*tips=@""; - if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"]&&[self.fishFeedModel.lightOpenStatus isEqualToString:@"00"]) + if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"]) { - tips=@"请先添加喂鱼设置"; + tips=@"请先添加喂鱼设置和关联"; } else if ([self.dataModel.fishFeedStatus isEqualToString:@"00"]) { @@ -373,7 +373,7 @@ } UIAlertController*alert=[UIAlertController alertControllerWithTitle:@"提示" message:tips preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction*okaction=[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"]&&[self.fishFeedModel.lightOpenStatus isEqualToString:@"00"]) + if ([self.fishFeedModel.lightChooseStatus isEqualToString:@"00"]) { XuanduofishFeedViewController *_settingVC = [[XuanduofishFeedViewController alloc] init]; _settingVC.currentdevice = self.currentDevice; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTempratueCorrectViewController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTempratueCorrectViewController.m index f124a6e..9d5f188 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTempratueCorrectViewController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTempratueCorrectViewController.m @@ -161,7 +161,7 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell"; label.textColor=[UIColor whiteColor]; label.font=[UIFont systemFontOfSize:12]; label.numberOfLines=0; - label.text=@"温度校准值需在±5℃以内,超过±5℃请更换水温抬头,更换探头后,需点击取消校准按钮,清除上一次温度校准的误差值"; + label.text=@"温度校准值需在±5℃以内,超过±5℃请更换水温探头,更换探头后,需点击取消校准按钮,清除上一次温度校准的误差值"; CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size; label.frame=CGRectMake((self.view.frame.size.width-size.width)/2.0, CGRectGetMaxY(tempView.frame)+100, size.width, size.height); [self.view addSubview:label]; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m index 44b7f15..5a0cb25 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduoTimerSettingViewController.m @@ -178,14 +178,22 @@ static NSString *cycleTimerflag = @"CycleTimerCell"; [self.tableView registerNib:[UINib nibWithNibName:addCellid bundle:nil] forCellReuseIdentifier:addCellid]; [self.tableView registerNib:[UINib nibWithNibName:cycleTimerflag bundle:nil] forCellReuseIdentifier:cycleTimerflag]; [self.tableView registerNib:[UINib nibWithNibName:setTimerflag bundle:nil] forCellReuseIdentifier:setTimerflag]; - if (self.timerType==2) + if (self.timerType==2||self.timerType==3) { UILabel*label=[[UILabel alloc]initWithFrame:CGRectZero]; label.textColor=[UIColor whiteColor]; label.font=[UIFont systemFontOfSize:12]; label.numberOfLines=0; - label.text=@"开启时间为设备运行的时间,关闭时间为设备停止的时间,例如,设置开启1小时,关闭2小时,设备将会运行1小时,停止2小时,以此规律循环运行。"; + if (self.timerType==2) + { + label.text=@"开启时间为设备运行的时间,关闭时间为设备停止的时间,例如,设置开启1小时,关闭2小时,设备将会运行1小时,停止2小时,以此规律循环运行。"; + } + else if (self.timerType==3) + { + label.text=@"在定时自恢复模式下设定好定时时间段,如果在定时开启的时间段内手动关闭设备,10分钟以后会自动开启,如果在关闭的时间段内手动开启设备,10分钟以后会自动关闭。例如,循环泵设定了2段定时,分别为:时段一8:00-12:00,时段二15:00-20:00,如果我们在8:00-12:00之间手动将循环泵关闭,10分钟以后系统会自动将循环泵开启,如果在12:00-15:00之间手动将循环泵打开,10分钟以后系统会自动将循环泵关闭。如果不需要设备在定时时间段内自动恢复开启状态,可在定时模式下设定时间。"; + } + CGSize size= [label.text boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:(NSStringDrawingUsesFontLeading | NSStringDrawingTruncatesLastVisibleLine | NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName: label.font} context:NULL].size; label.frame=CGRectMake((kScreenWidth-size.width)/2.0, 300, size.width, size.height); [self.view addSubview:label]; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduofishFeedViewController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduofishFeedViewController.m index bae49f8..d79c513 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduofishFeedViewController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/XuanduofishFeedViewController.m @@ -652,7 +652,11 @@ static NSString *timerTypeFlag = @"TimerTypeTableViewCell"; NSString*binaryLightChooseStatus=[dataContorl getBinaryByHex:self.fishFeedModel.lightChooseStatus]; - binaryLightChooseStatus =[binaryLightChooseStatus stringByReplacingCharactersInRange:NSMakeRange(location, 1) withString:btn.selected?@"1":@"0"]; + if (binaryLightChooseStatus.length>location) + { + binaryLightChooseStatus =[binaryLightChooseStatus stringByReplacingCharactersInRange:NSMakeRange(location, 1) withString:btn.selected?@"1":@"0"]; + } + NSString*hexLightChooseStatus=[dataContorl getHexByBinary:binaryLightChooseStatus]; self.fishFeedModel.lightChooseStatus=hexLightChooseStatus; baseModel*readModel=[[baseModel alloc]init];