incyclist-devices 2.0.23 → 2.0.24
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.
|
@@ -266,12 +266,12 @@ class AntInterface extends events_1.default {
|
|
|
266
266
|
return stopped;
|
|
267
267
|
}
|
|
268
268
|
catch (err) {
|
|
269
|
-
this.logEvent({ message: 'could not stop sensor', error: err.message || err, stack: err.stack });
|
|
269
|
+
this.logEvent({ message: 'could not stop sensor', error: err.message || err, deviceID: sensor.getDeviceID(), stack: err.stack });
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
else {
|
|
274
|
-
this.logEvent({ message: 'could not stop sensor', error: 'no channel attached' });
|
|
274
|
+
this.logEvent({ message: 'could not stop sensor', deviceID: sensor.getDeviceID(), error: 'no channel attached' });
|
|
275
275
|
return false;
|
|
276
276
|
}
|
|
277
277
|
});
|
package/lib/antv2/fe/adapter.js
CHANGED
|
@@ -115,14 +115,14 @@ class AntFEAdapter extends adapter_1.ControllableAntAdapter {
|
|
|
115
115
|
this.dataMsgCount++;
|
|
116
116
|
this.lastDataTS = Date.now();
|
|
117
117
|
super.onDeviceData(deviceData);
|
|
118
|
-
if (!this.started || this.isStopped()
|
|
118
|
+
if (!this.started || this.isStopped())
|
|
119
119
|
return;
|
|
120
120
|
if (!this.ivDataTimeout && this.dataMsgCount > 0) {
|
|
121
121
|
this.startDataTimeoutCheck();
|
|
122
122
|
}
|
|
123
123
|
try {
|
|
124
124
|
const logData = this.getLogData(deviceData, ['PairedDevices', 'RawData']);
|
|
125
|
-
this.logger.logEvent({ message: 'onDeviceData', data: logData });
|
|
125
|
+
this.logger.logEvent({ message: 'onDeviceData', data: logData, paused: this.paused });
|
|
126
126
|
if (!this.canSendUpdate())
|
|
127
127
|
return;
|
|
128
128
|
let incyclistData = this.mapToCycleModeData(deviceData);
|
|
@@ -281,13 +281,14 @@ class AntFEAdapter extends adapter_1.ControllableAntAdapter {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
if (success) {
|
|
284
|
-
this.logEvent({ message: 'start success' });
|
|
284
|
+
this.logEvent({ message: 'ANT FE start success' });
|
|
285
285
|
this.started = true;
|
|
286
|
+
this.paused = false;
|
|
286
287
|
stopTimeoutCheck();
|
|
287
288
|
resolve(true);
|
|
288
289
|
}
|
|
289
290
|
else {
|
|
290
|
-
this.logEvent({ message: 'start failed' });
|
|
291
|
+
this.logEvent({ message: 'ANT FE start failed' });
|
|
291
292
|
stopTimeoutCheck();
|
|
292
293
|
if (!hasData) {
|
|
293
294
|
reject(new Error('could not start device, reason: no data received'));
|