Permalink
Browse files

修改了在添加了重连设备,在实时获取设备RSSI值时,会出现RSSI值为nil,造成崩溃的现象

  • Loading branch information...
wangxumin committed Nov 11, 2016
1 parent 1f725a0 commit 24d02b29a9800e5e529a29bbd966510d6fd053cd
Showing with 1 addition and 1 deletion.
  1. +1 −1 Classes/objc/BabyCentralManager.m
@@ -407,7 +407,7 @@ - (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(nullable NSErr
}
#else
- (void)peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(NSError *)error {
[[NSNotificationCenter defaultCenter]postNotificationName:BabyNotificationAtDidReadRSSI object:@{@"peripheral":peripheral,@"RSSI":RSSI,@"error":error?error:@""}];
[[NSNotificationCenter defaultCenter]postNotificationName:BabyNotificationAtDidReadRSSI object:@{@"peripheral":peripheral,@"RSSI":RSSI?RSSI:@100,@"error":error?error:@""}];
BabyLog(@">>>peripheralDidUpdateRSSI -> RSSI:%@",RSSI);
if ([currChannel blockOnDidReadRSSI]) {

0 comments on commit 24d02b2

Please sign in to comment.