incyclist-devices 2.4.13 → 2.4.14

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.
@@ -52,6 +52,7 @@ export default class BleAdapter<TDeviceData extends BleDeviceData, TDevice exten
52
52
  protected startAdapter(startProps?: BleStartProperties): Promise<boolean>;
53
53
  startSensor(): Promise<boolean>;
54
54
  protected onDisconnectDone(): Promise<void>;
55
+ restart(pause?: number): Promise<boolean>;
55
56
  stop(): Promise<boolean>;
56
57
  pause(): Promise<boolean>;
57
58
  resume(): Promise<boolean>;
@@ -379,6 +379,17 @@ class BleAdapter extends adpater_1.default {
379
379
  }
380
380
  });
381
381
  }
382
+ restart(pause) {
383
+ const _super = Object.create(null, {
384
+ restart: { get: () => super.restart }
385
+ });
386
+ return __awaiter(this, void 0, void 0, function* () {
387
+ const sensor = this.getSensor();
388
+ yield sensor.getPeripheral().disconnect();
389
+ const res = yield _super.restart.call(this, pause);
390
+ return res;
391
+ });
392
+ }
382
393
  stop() {
383
394
  return __awaiter(this, void 0, void 0, function* () {
384
395
  this.logEvent({ message: 'stopping device', device: this.getName(), interface: this.getInterface() });
@@ -125,6 +125,7 @@ class BlePeripheral {
125
125
  if (this.disconnectedSignalled || this.disconnecting)
126
126
  return;
127
127
  this.disconnectedSignalled = true;
128
+ this.ble.resumeLogging();
128
129
  this.logEvent({ message: 'peripheral disconnected', address: (_a = this.getPeripheral()) === null || _a === void 0 ? void 0 : _a.address });
129
130
  try {
130
131
  yield this.disconnect(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "2.4.13",
3
+ "version": "2.4.14",
4
4
  "dependencies": {
5
5
  "@protobuf-ts/runtime": "^2.11.1",
6
6
  "@serialport/bindings-interface": "^1.2.2",