incyclist-devices 1.5.26 → 1.5.27

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.
@@ -237,6 +237,15 @@ class AntInterface extends events_1.default {
237
237
  const channel = sensor.getChannel();
238
238
  if (channel) {
239
239
  try {
240
+ if (!channel.flush) {
241
+ this.logEvent({ message: 'old version of ant-channel detected' });
242
+ channel.flush = () => {
243
+ const c = channel;
244
+ c.messageQueue.forEach(msg => { msg.resolve(false); });
245
+ c.messageQueue = [];
246
+ c.isWriting = false;
247
+ };
248
+ }
240
249
  channel.flush();
241
250
  channel.removeAllListeners('data');
242
251
  return yield channel.stopSensor(sensor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "incyclist-devices",
3
- "version": "1.5.26",
3
+ "version": "1.5.27",
4
4
  "dependencies": {
5
5
  "@serialport/parser-byte-length": "^9.0.1",
6
6
  "@serialport/parser-delimiter": "^9.0.1",