恒温显示数值修改和智能连接获取wifi提示
This commit is contained in:
+18
-5
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user