Skip to content

Commit

Permalink
backends/p4android/scanner: fix crash when getting rssi
Browse files Browse the repository at this point in the history
In #1047, the call to getRssi() was broken by using the wrong object.

This fixes the mistake.

Fixes #1085.
  • Loading branch information
dlech committed Oct 25, 2022
1 parent 38af4e8 commit b48e4cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0
`Unreleased`_
=============

Fixed
-----
* Fixed crash in Android backend introduced in v0.19.0. Fixes #1085.

`0.19.0`_ (2022-10-13)
======================

Expand Down
2 changes: 1 addition & 1 deletion bleak/backends/p4android/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _handle_scan_result(self, result):
service_data=service_data,
service_uuids=service_uuids,
tx_power=tx_power,
rssi=native_device.getRssi(),
rssi=result.getRssi(),
platform_data=(result,),
)

Expand Down

0 comments on commit b48e4cf

Please sign in to comment.