incyclist-devices 1.4.15 → 1.4.16
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.
|
@@ -430,14 +430,21 @@ class KettlerRacerAdapter extends Device_1.default {
|
|
|
430
430
|
this.updateBusy = true;
|
|
431
431
|
this.getStatus()
|
|
432
432
|
.then((bikeData) => {
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
433
|
+
if (!bikeData)
|
|
434
|
+
return;
|
|
435
|
+
try {
|
|
436
|
+
this.kettlerData = bikeData;
|
|
437
|
+
let data = this.mapData(bikeData);
|
|
438
|
+
data = this.getCyclingMode().updateData(data);
|
|
439
|
+
this.data = this.transformData(data, bikeData);
|
|
440
|
+
}
|
|
441
|
+
catch (err) {
|
|
442
|
+
this.logger.logEvent({ message: 'bike update error', error: err.message });
|
|
443
|
+
}
|
|
437
444
|
this.updateBusy = false;
|
|
438
445
|
})
|
|
439
446
|
.catch(err => {
|
|
440
|
-
this.logger.logEvent({ message: 'bike update error', error: err.message
|
|
447
|
+
this.logger.logEvent({ message: 'bike update error', error: err.message });
|
|
441
448
|
this.updateBusy = false;
|
|
442
449
|
});
|
|
443
450
|
});
|