forked from JetBridge-io/react-native-obd2
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathindex.js
More file actions
39 lines (30 loc) · 799 Bytes
/
Copy pathindex.js
File metadata and controls
39 lines (30 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Copyright (c) 2016-present JetBridge, LLC.
* All rights reserved.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
'use strict';
const jetbridge_obd2 = require('react-native').NativeModules.JetBridge_OBDII;
class react_obd2 {
constructor() {
}
ready() {
jetbridge_obd2.ready();
}
getBluetoothDeviceNameList() {
return jetbridge_obd2.getBluetoothDeviceName();
}
setMockUpMode(aEnabled) {
jetbridge_obd2.setMockUpMode(aEnabled);
}
startLiveData(aDeviceAddress) {
jetbridge_obd2.setRemoteDeviceAddress(aDeviceAddress);
jetbridge_obd2.startLiveData();
}
stopLiveData() {
return jetbridge_obd2.stopLiveData();
}
}
module.exports = new react_obd2();