恒温显示数值修改和智能连接获取wifi提示

This commit is contained in:
kai60 2020-05-06 11:15:07 +08:00
parent 8d0003b9cd
commit b15f10afe2
2 changed files with 20 additions and 7 deletions

View File

@ -279,8 +279,8 @@
UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime];
//float TPlabel=mac/10+(mac%10)*0.1;
float temp1 = mac1/10.0;
NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp1];
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]}];
[self.light1 setImage:uvNomal forState:UIControlStateNormal];

View File

@ -323,6 +323,12 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
[alert show];
return;
}
if ([self.wifiName.uppercaseString isEqualToString:@"WLAN"]) {
UIAlertView *alert= [[UIAlertView alloc] initWithTitle:@"" message:@"获取到的WiFi无效" delegate:nil cancelButtonTitle:@"重试" otherButtonTitles:nil, nil];
alert.tag=3;
[alert show];
return;
}
BOOL isRight =[dataContorl isIncludeSpecialCharact:self.wifiSecFiled.text];
if (!isRight) {
@ -396,8 +402,8 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
*/
- (void)p2pDeviceLinker:(GWP2PDeviceLinker *)linker deviceLinkSuccess:(NSDictionary *)deviceDict
{
// NSLog(@"扫描到设备");
// [self deviceLinkin:deviceDict linkType:self.conectType];
NSLog(@"扫描到设备");
[self deviceLinkin:deviceDict linkType:self.conectType];
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
@ -440,6 +446,10 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
}
}
}//重试wifi
else if (alertView.tag==3){
[self initComponent];
}
}
@ -454,7 +464,7 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
//AP配网时有值 smart没有值
if ([self.deviceID isEqualToString:deviceID]||self.deviceID==nil)
{
self.isDeviceLinkIn = YES;
self.isDeviceLinkIn = YES;
if (type==conectType_Intelligent)
{
[self.view makeToast:@"声波配网成功"];
@ -463,8 +473,10 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
else
{
[self.view makeToast:@"AP配网成功"];
[[GWP2PDeviceLinker shareInstance] p2pStopAPLink]; }
[[GWP2PDeviceLinker shareInstance] p2pStopAPLink];
}
// NSString *devicePassword = deviceDict[@"devicePassword"];
self.deviceID = deviceID;
@ -547,6 +559,7 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔复位摄像
WEAK_SELF;
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(100 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
[self deviceLinkinTimeout:self.conectType];
});
[[GWP2PDeviceLinker shareInstance] p2pSmartLinkDeviceWithWiFiSSID:weakSelf.wifiName password:weakSelf.wifiPwd useSimpleConfig:YES deviceLinkIn:^(NSDictionary *deviceDict) {