incyclist-devices 1.4.7 → 1.4.8

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.
@@ -147,13 +147,17 @@ class DaumAdapterBase extends Device_1.default {
147
147
  return;
148
148
  if (this.ignoreBike && this.ignoreHrm && this.ignorePower)
149
149
  return;
150
- this.iv = setInterval(() => {
150
+ const ivSync = setInterval(() => {
151
151
  this.bikeSync();
152
152
  }, 1000);
153
- this.iv = setInterval(() => {
153
+ const ivUpdate = setInterval(() => {
154
154
  this.sendData();
155
155
  this.refreshRequests();
156
156
  }, 1000);
157
+ this.iv = {
158
+ sync: ivSync,
159
+ update: ivUpdate
160
+ };
157
161
  }
158
162
  connect() {
159
163
  if (!this.bike.isConnected())
@@ -173,7 +177,10 @@ class DaumAdapterBase extends Device_1.default {
173
177
  return new Promise((resolve, reject) => {
174
178
  try {
175
179
  if (this.iv) {
176
- clearInterval(this.iv);
180
+ if (this.iv.sync)
181
+ clearInterval(this.iv.sync);
182
+ if (this.iv.update)
183
+ clearInterval(this.iv.update);
177
184
  this.iv = undefined;
178
185
  }
179
186
  this.logEvent({ message: 'stop request completed' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "dependencies": {
5
5
  "@serialport/parser-byte-length": "^9.0.1",
6
6
  "@serialport/parser-delimiter": "^9.0.1",