Skip to content

Commit 8de9b52

Browse files
author
Marco Crespi
committed
Merge branch 'develop'
2 parents 6762b70 + 3ed4b73 commit 8de9b52

File tree

5 files changed

+2
-86
lines changed

5 files changed

+2
-86
lines changed

lib/models/MODblue.d.ts

-4
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,5 @@ export declare abstract class MODblue {
1212
* List all currenctly detected adapters.
1313
*/
1414
abstract getAdapters(): Promise<Adapter[]>;
15-
/**
16-
* Tries to automatically detect the current platform and use the most appropriate BLE bindings.
17-
*/
18-
static autoDetectBindings(): Promise<MODblue>;
1915
}
2016
//# sourceMappingURL=MODblue.d.ts.map

lib/models/MODblue.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

lib/models/MODblue.js

-55
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/models/MODblue.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/models/MODblue.ts

-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
2-
import os from 'os';
3-
41
import { Adapter } from './Adapter';
52

63
/**
@@ -17,26 +14,4 @@ export abstract class MODblue {
1714
* List all currenctly detected adapters.
1815
*/
1916
public abstract getAdapters(): Promise<Adapter[]>;
20-
21-
/**
22-
* Tries to automatically detect the current platform and use the most appropriate BLE bindings.
23-
*/
24-
public static async autoDetectBindings(): Promise<MODblue> {
25-
const platform = os.platform();
26-
27-
if (typeof navigator !== 'undefined' && navigator.bluetooth) {
28-
return new (await import('../bindings/web')).WebMODblue();
29-
} /*else if (platform === 'darwin') {
30-
console.log('using mac');
31-
return new (require('../bindings/mac').MacMODblue)();
32-
}*/ else if (
33-
platform === 'linux' ||
34-
platform === 'freebsd' ||
35-
platform === 'win32'
36-
) {
37-
return new (await import('../bindings/hci')).HciMODblue();
38-
} else {
39-
throw new Error('Unsupported platform');
40-
}
41-
}
4217
}

0 commit comments

Comments
 (0)