incyclist-devices 2.0.37 → 2.0.38

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.
@@ -203,8 +203,11 @@ class AntAdapter extends adpater_1.default {
203
203
  }
204
204
  start(props = {}) {
205
205
  return __awaiter(this, void 0, void 0, function* () {
206
- if (this.started && !this.stopped)
206
+ if (this.started && !this.stopped) {
207
+ if (this.paused)
208
+ this.resume();
207
209
  return true;
210
+ }
208
211
  this.stopped = false;
209
212
  const connected = yield this.connect();
210
213
  if (!connected)
@@ -212,6 +215,7 @@ class AntAdapter extends adpater_1.default {
212
215
  return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
213
216
  this.resetData();
214
217
  this.stopped = false;
218
+ this.resume();
215
219
  const { startupTimeout = 20000 } = props;
216
220
  let to = setTimeout(() => __awaiter(this, void 0, void 0, function* () {
217
221
  try {
@@ -168,10 +168,9 @@ class BleAdapter extends adpater_1.default {
168
168
  const wasStopped = this.stopped;
169
169
  if (wasPaused)
170
170
  this.resume();
171
- if (wasStopped)
172
- this.stopped = false;
173
- if (this.started && !wasPaused && !wasStopped)
171
+ if (this.started && !wasStopped)
174
172
  return true;
173
+ this.stopped = false;
175
174
  const connected = yield this.connect();
176
175
  if (!connected)
177
176
  throw new Error(`could not start device, reason:could not connect`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "2.0.37",
3
+ "version": "2.0.38",
4
4
  "dependencies": {
5
5
  "@serialport/bindings-interface": "^1.2.2",
6
6
  "@serialport/parser-byte-length": "^9.0.1",