提交 c1c85721 编写于 作者: d-u-a's avatar d-u-a

update: new bluetooth API: uni.setBLEMTU uni.getBLEDeviceRSSI

上级 8ac87cec
......@@ -109,7 +109,9 @@ const device = [
'getBLEDeviceServices',
'getBLEDeviceCharacteristics',
'createBLEConnection',
'closeBLEConnection',
'closeBLEConnection',
'setBLEMTU',
'getBLEDeviceRSSI',
'onBeaconServiceChange',
'onBeaconUpdate',
'getBeacons',
......
......@@ -113,7 +113,9 @@
"uni.getBLEDeviceServices": true,
"uni.getBLEDeviceCharacteristics": true,
"uni.createBLEConnection": true,
"uni.closeBLEConnection": true,
"uni.closeBLEConnection": true,
"uni.setBLEMTU": true,
"uni.getBLEDeviceRSSI": true,
"uni.onBeaconServiceChange": true,
"uni.onBeaconUpdate": true,
"uni.getBeacons": true,
......
......@@ -121,3 +121,11 @@ export function readBLECharacteristicValue (data, callbackId) {
export function writeBLECharacteristicValue (data, callbackId) {
bluetoothExec('writeBLECharacteristicValue', callbackId, data)
}
export function setBLEMTU (data, callbackId) {
bluetoothExec('setBLEMTU', callbackId, data)
}
export function getBLEDeviceRSSI (data, callbackId) {
bluetoothExec('getBLEDeviceRSSI', callbackId, data)
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册