Skip to content

Commit

Permalink
fix(mac): Fix inconsistent addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed May 27, 2021
1 parent 45edd40 commit b5b608a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bindings/mac/Adapter.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/bindings/mac/Adapter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/mac/Adapter.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/bindings/mac/Adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export class MacAdapter extends Adapter {
advertisement: { localName?: string; manufacturerData?: Buffer },
rssi: number
) => {
// Fixes address on some macs
address = address.replace(/-/g, ':');
let peripheral = this.peripherals.get(uuid);
if (!peripheral) {
peripheral = new MacPeripheral(
Expand Down

0 comments on commit b5b608a

Please sign in to comment.