恒温显示数值修改和智能连接获取wifi提示
This commit is contained in:
parent
8d0003b9cd
commit
b15f10afe2
|
|
@ -279,8 +279,8 @@
|
||||||
UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime];
|
UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime];
|
||||||
|
|
||||||
//float TPlabel=mac/10+(mac%10)*0.1;
|
//float TPlabel=mac/10+(mac%10)*0.1;
|
||||||
float temp1 = mac1/10.0;
|
float temp1 = mac1;
|
||||||
NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp1];
|
NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1];
|
||||||
UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"];
|
UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"];
|
||||||
uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
|
uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}];
|
||||||
[self.light1 setImage:uvNomal forState:UIControlStateNormal];
|
[self.light1 setImage:uvNomal forState:UIControlStateNormal];
|
||||||
|
|
|
||||||
|
|
@ -323,6 +323,12 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔,复位摄像
|
||||||
[alert show];
|
[alert show];
|
||||||
return;
|
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];
|
BOOL isRight =[dataContorl isIncludeSpecialCharact:self.wifiSecFiled.text];
|
||||||
|
|
||||||
if (!isRight) {
|
if (!isRight) {
|
||||||
|
|
@ -396,8 +402,8 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔,复位摄像
|
||||||
*/
|
*/
|
||||||
- (void)p2pDeviceLinker:(GWP2PDeviceLinker *)linker deviceLinkSuccess:(NSDictionary *)deviceDict
|
- (void)p2pDeviceLinker:(GWP2PDeviceLinker *)linker deviceLinkSuccess:(NSDictionary *)deviceDict
|
||||||
{
|
{
|
||||||
// NSLog(@"扫描到设备");
|
NSLog(@"扫描到设备");
|
||||||
// [self deviceLinkin:deviceDict linkType:self.conectType];
|
[self deviceLinkin:deviceDict linkType:self.conectType];
|
||||||
}
|
}
|
||||||
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
|
-(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没有值
|
//AP配网时有值 smart没有值
|
||||||
if ([self.deviceID isEqualToString:deviceID]||self.deviceID==nil)
|
if ([self.deviceID isEqualToString:deviceID]||self.deviceID==nil)
|
||||||
{
|
{
|
||||||
self.isDeviceLinkIn = YES;
|
self.isDeviceLinkIn = YES;
|
||||||
if (type==conectType_Intelligent)
|
if (type==conectType_Intelligent)
|
||||||
{
|
{
|
||||||
[self.view makeToast:@"声波配网成功"];
|
[self.view makeToast:@"声波配网成功"];
|
||||||
|
|
@ -463,7 +473,9 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔,复位摄像
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self.view makeToast:@"AP配网成功"];
|
[self.view makeToast:@"AP配网成功"];
|
||||||
[[GWP2PDeviceLinker shareInstance] p2pStopAPLink]; }
|
[[GWP2PDeviceLinker shareInstance] p2pStopAPLink];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// NSString *devicePassword = deviceDict[@"devicePassword"];
|
// NSString *devicePassword = deviceDict[@"devicePassword"];
|
||||||
|
|
@ -547,6 +559,7 @@ self.attentionLabel.text=@"1、请长按摄像头背后复位孔,复位摄像
|
||||||
WEAK_SELF;
|
WEAK_SELF;
|
||||||
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
|
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(100 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(100 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||||
|
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
|
||||||
[self deviceLinkinTimeout:self.conectType];
|
[self deviceLinkinTimeout:self.conectType];
|
||||||
});
|
});
|
||||||
[[GWP2PDeviceLinker shareInstance] p2pSmartLinkDeviceWithWiFiSSID:weakSelf.wifiName password:weakSelf.wifiPwd useSimpleConfig:YES deviceLinkIn:^(NSDictionary *deviceDict) {
|
[[GWP2PDeviceLinker shareInstance] p2pSmartLinkDeviceWithWiFiSSID:weakSelf.wifiName password:weakSelf.wifiPwd useSimpleConfig:YES deviceLinkIn:^(NSDictionary *deviceDict) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue