incyclist-devices 1.4.8 → 1.4.9
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.
|
@@ -131,7 +131,8 @@ class ERGCyclingMode extends CyclingMode_1.CyclingModeBase {
|
|
|
131
131
|
const prevSpeed = prevData.speed;
|
|
132
132
|
const prevRequest = this.prevRequest || {};
|
|
133
133
|
const data = this.data || {};
|
|
134
|
-
const bikeType = this.getSetting('bikeType');
|
|
134
|
+
const bikeType = this.getSetting('bikeType').toLowerCase();
|
|
135
|
+
console.log('~~~ bikeType', bikeType);
|
|
135
136
|
delete this.event.gearUpdated;
|
|
136
137
|
delete this.event.rpmUpdated;
|
|
137
138
|
if (prevData === {} || prevData.speed === undefined || prevData.speed === 0) {
|
package/lib/daum/premium/bike.js
CHANGED
|
@@ -26,6 +26,8 @@ const OPEN_TIMEOUT = 1000;
|
|
|
26
26
|
const DAUM_PREMIUM_DEFAULT_PORT = 51955;
|
|
27
27
|
const DAUM_PREMIUM_DEFAULT_HOST = '127.0.0.1';
|
|
28
28
|
const MAX_DATA_BLOCK_SIZE = 512;
|
|
29
|
+
const DS_BITS_OFF = 0;
|
|
30
|
+
const DS_BITS_ENDLESS_RACE = 2;
|
|
29
31
|
var __SerialPort = undefined;
|
|
30
32
|
var net = undefined;
|
|
31
33
|
const DEBUG_LOGGER = {
|
|
@@ -739,6 +741,7 @@ class Daum8i {
|
|
|
739
741
|
const epp = route ? (0, utils_1.routeToEpp)(route) : undefined;
|
|
740
742
|
const eppLength = epp ? epp.length : 0;
|
|
741
743
|
const bikeTypeVal = (0, utils_1.getBikeType)(bikeType);
|
|
744
|
+
const wBits = route.lapMode ? DS_BITS_ENDLESS_RACE : DS_BITS_OFF;
|
|
742
745
|
payload.writeInt32LE(0, 0);
|
|
743
746
|
payload.writeInt8(bikeTypeVal, 4);
|
|
744
747
|
payload.writeInt8(0, 5);
|
|
@@ -750,7 +753,7 @@ class Daum8i {
|
|
|
750
753
|
payload.writeInt16LE(0, 24);
|
|
751
754
|
payload.writeInt16LE(0, 26);
|
|
752
755
|
payload.writeInt16LE(0, 28);
|
|
753
|
-
payload.writeInt16LE(
|
|
756
|
+
payload.writeInt16LE(wBits, 30);
|
|
754
757
|
payload.writeInt32LE(7, 32);
|
|
755
758
|
payload.writeInt32LE(eppLength, 36);
|
|
756
759
|
this.logger.logEvent({ message: 'programUploadStart() request', bikeType, length: eppLength });
|