Skip to content

Commit

Permalink
修改了在添加了重连设备,在实时获取设备RSSI值时,会出现RSSI值为nil,造成崩溃的现象
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxumin committed Nov 11, 2016
1 parent 1f725a0 commit 24d02b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/objc/BabyCentralManager.m
Expand Up @@ -407,7 +407,7 @@ - (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(nullable NSErr
} }
#else #else
- (void)peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(NSError *)error { - (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); BabyLog(@">>>peripheralDidUpdateRSSI -> RSSI:%@",RSSI);
if ([currChannel blockOnDidReadRSSI]) { if ([currChannel blockOnDidReadRSSI]) {
Expand Down

0 comments on commit 24d02b2

Please sign in to comment.