Skip to content

Commit 1363dcc

Browse files
committed
Use didReadRSSI
1 parent 6fca112 commit 1363dcc

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.4.3 - 2017-11-08
2+
- Use didReadRSSI
3+
14
## 4.4.2 - 2017-07-04
25
- Allow Windows scanning to be restarted [\#438](https://github.com/randdusing/cordova-plugin-bluetoothle/pull/438)
36

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-bluetoothle",
3-
"version": "4.4.2",
3+
"version": "4.4.3",
44
"description": "Use the Bluetooth Low Energy plugin to connect your Cordova app to new Bluetooth devices like heart rate monitors, thermometers, etc...",
55
"types": "./types/index.d.ts",
66
"cordova": {

plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" id="cordova-plugin-bluetoothle" version="4.4.2">
2+
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" id="cordova-plugin-bluetoothle" version="4.4.3">
33
<engines>
44
<engine name="cordova-plugman" version=">=5.0.0" />
55
<engine name="cordova-android" version=">=5.0.0" />

src/ios/BluetoothLePlugin.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForChara
28222822
}
28232823
}
28242824

2825-
- (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)error {
2825+
- (void) peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(NSError *)error {
28262826
//Get connection
28272827
NSMutableDictionary* connection = [connections objectForKey:peripheral.identifier];
28282828
if (connection == nil) {
@@ -2855,7 +2855,7 @@ - (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)erro
28552855
}
28562856

28572857
//Return RSSI value
2858-
[returnObj setValue:peripheral.RSSI forKey:keyRssi];
2858+
[returnObj setValue:RSSI forKey:keyRssi];
28592859
[returnObj setValue:statusRssi forKey:keyStatus];
28602860

28612861
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnObj];

src/osx/BluetoothLePlugin.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2822,7 +2822,7 @@ - (void)peripheral:(CBPeripheral *)peripheral didUpdateNotificationStateForChara
28222822
}
28232823
}
28242824

2825-
- (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)error {
2825+
- (void) peripheral:(CBPeripheral *)peripheral didReadRSSI:(NSNumber *)RSSI error:(NSError *)error {
28262826
//Get connection
28272827
NSMutableDictionary* connection = [connections objectForKey:peripheral.identifier];
28282828
if (connection == nil) {
@@ -2855,7 +2855,7 @@ - (void)peripheralDidUpdateRSSI:(CBPeripheral *)peripheral error:(NSError *)erro
28552855
}
28562856

28572857
//Return RSSI value
2858-
[returnObj setValue:peripheral.RSSI forKey:keyRssi];
2858+
[returnObj setValue:RSSI forKey:keyRssi];
28592859
[returnObj setValue:statusRssi forKey:keyStatus];
28602860

28612861
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnObj];

0 commit comments

Comments
 (0)