@ray-js/robot-data-stream 0.0.11 → 0.0.12-beta-1

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.
@@ -358,9 +358,8 @@ export class SweeperP2p extends P2pApi {
358
358
  [...this.packetDataCacheMap.keys()].forEach(key => {
359
359
  this.packetDataCacheMap.set(key, new Map());
360
360
  });
361
- } else {
362
- this.cacheData = {};
363
361
  }
362
+ this.cacheData = {};
364
363
  this.offFileDownloadComplete && this.offFileDownloadComplete();
365
364
  this.offP2pStreamPacketReceive && this.offP2pStreamPacketReceive();
366
365
 
@@ -425,6 +424,11 @@ export class SweeperP2p extends P2pApi {
425
424
  return;
426
425
  }
427
426
  const cacheSerialNumber = this.packetSerialNumberCacheMap.get(fileName);
427
+ if (fileName.includes('cleanPath')) {
428
+ logger('info', {
429
+ msg: `receive a path package, ${fileSerialNumber}, ${packetIndex}, ${packetType}, ${cacheSerialNumber}}`
430
+ }, this.onLogger);
431
+ }
428
432
 
429
433
  // 说明收到了过时包的数据
430
434
  if (fileSerialNumber < cacheSerialNumber) return;
@@ -471,6 +475,9 @@ export class SweeperP2p extends P2pApi {
471
475
  this.onReceiveMapData(hexValue);
472
476
  }
473
477
  if (type === 1) {
478
+ logger('info', {
479
+ msg: `push new path data`
480
+ }, this.onLogger);
474
481
  this.onReceivePathData(hexValue);
475
482
  }
476
483
  if (type === 4) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/robot-data-stream",
3
- "version": "0.0.11",
3
+ "version": "0.0.12-beta-1",
4
4
  "description": "扫地机P2P数据流标准化组件",
5
5
  "main": "lib/index",
6
6
  "files": [