@ray-js/robot-data-stream 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +4 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -20,10 +20,6 @@ const useP2PDataStream = (devId, onReceiveMapData, onReceivePathData, opt) => {
|
|
|
20
20
|
if (logTag) {
|
|
21
21
|
log4js.setTag(logTag);
|
|
22
22
|
}
|
|
23
|
-
if (devId.startsWith('vdevo')) {
|
|
24
|
-
log4js.warn('virtual device cannot use p2p');
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
23
|
if (isIDE) {
|
|
28
24
|
log4js.warn(`You are using the IDE environment. To perform P2P and map debugging, please ensure the 'Robot Vacuum Debugger' plugin is installed.`);
|
|
29
25
|
SweeperP2pInstance.onReceiveMapData = onReceiveMapData;
|
|
@@ -33,6 +29,10 @@ const useP2PDataStream = (devId, onReceiveMapData, onReceivePathData, opt) => {
|
|
|
33
29
|
SweeperP2pInstance.removeP2pDownloadEvent();
|
|
34
30
|
};
|
|
35
31
|
}
|
|
32
|
+
if (devId.startsWith('vdevo')) {
|
|
33
|
+
log4js.warn('virtual device cannot use p2p');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
36
|
SweeperP2pInstance.initP2pSdk(devId).then(() => {
|
|
37
37
|
connectP2p();
|
|
38
38
|
});
|