wifi-rtt-module
v0.7.2
Published
test
Downloads
269
Maintainers
Readme
wifi-rtt-module
wifi-rtt-module
Installation
npm install wifi-rtt-module
Usage
import {
isAvailable,
hasFeatureWifiRtt,
isAvailableRtt,
startRanging,
getRangingResult,
endRanging
} from 'wifi-rtt-module';
// ...
isAvailable((result) => {
...
});
hasFeatureWifiRtt((result) => {
...
});
isAvailableRtt((result) => {
...
});
try {
//Available modes: 'WITH_RTT', 'WITHOUT_RTT', 'MIXED'
const result = await startRanging("MIXED");
//...
} catch (e) {
//...
}
try {
const result = await getRangingResult();
//...
} catch (e) {
//...
}
endRanging();