incyclist-services 1.9.4 → 1.9.5
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.
|
@@ -98,9 +98,9 @@ let LocalFitConverter = (() => {
|
|
|
98
98
|
}
|
|
99
99
|
mapLogToFit(log) {
|
|
100
100
|
const { time, speed, slope, cadence: cadenceOrg, heartrate: heartrateOrg, distance, power: powerOrg, lat, lng, elevation } = log;
|
|
101
|
-
const cadence = Math.round(cadenceOrg);
|
|
102
|
-
const heartrate = Math.round(heartrateOrg);
|
|
103
|
-
const power = Math.round(powerOrg);
|
|
101
|
+
const cadence = cadenceOrg != null ? Math.round(cadenceOrg) : undefined;
|
|
102
|
+
const heartrate = heartrateOrg != null ? Math.round(heartrateOrg) : undefined;
|
|
103
|
+
const power = powerOrg != null ? Math.round(powerOrg) : undefined;
|
|
104
104
|
return { time, speed, slope, cadence, heartrate, distance, power, lat, lon: lng, elevation };
|
|
105
105
|
}
|
|
106
106
|
buildSerialNo() {
|
|
@@ -176,7 +176,7 @@ let LocalFitConverter = (() => {
|
|
|
176
176
|
record.power = log.power;
|
|
177
177
|
if (log.slope != null)
|
|
178
178
|
record.grade = log.slope;
|
|
179
|
-
|
|
179
|
+
encodeMesg(fitsdk_1.Profile.MesgNum.RECORD, record);
|
|
180
180
|
});
|
|
181
181
|
const endTime = new Date(lastTimestampMs);
|
|
182
182
|
encodeMesg(fitsdk_1.Profile.MesgNum.EVENT, {
|
|
@@ -473,7 +473,7 @@ let FreeRideDisplayService = (() => {
|
|
|
473
473
|
];
|
|
474
474
|
}
|
|
475
475
|
getMapCenter() {
|
|
476
|
-
if (!this.optionsVisible || !this.currentOptions)
|
|
476
|
+
if (!this.optionsVisible || !this.currentOptions?.length)
|
|
477
477
|
return;
|
|
478
478
|
const { lat, lng } = this.currentOptions[0].path[0];
|
|
479
479
|
return { lat, lng };
|
|
@@ -95,9 +95,9 @@ let LocalFitConverter = (() => {
|
|
|
95
95
|
}
|
|
96
96
|
mapLogToFit(log) {
|
|
97
97
|
const { time, speed, slope, cadence: cadenceOrg, heartrate: heartrateOrg, distance, power: powerOrg, lat, lng, elevation } = log;
|
|
98
|
-
const cadence = Math.round(cadenceOrg);
|
|
99
|
-
const heartrate = Math.round(heartrateOrg);
|
|
100
|
-
const power = Math.round(powerOrg);
|
|
98
|
+
const cadence = cadenceOrg != null ? Math.round(cadenceOrg) : undefined;
|
|
99
|
+
const heartrate = heartrateOrg != null ? Math.round(heartrateOrg) : undefined;
|
|
100
|
+
const power = powerOrg != null ? Math.round(powerOrg) : undefined;
|
|
101
101
|
return { time, speed, slope, cadence, heartrate, distance, power, lat, lon: lng, elevation };
|
|
102
102
|
}
|
|
103
103
|
buildSerialNo() {
|
|
@@ -173,7 +173,7 @@ let LocalFitConverter = (() => {
|
|
|
173
173
|
record.power = log.power;
|
|
174
174
|
if (log.slope != null)
|
|
175
175
|
record.grade = log.slope;
|
|
176
|
-
|
|
176
|
+
encodeMesg(Profile.MesgNum.RECORD, record);
|
|
177
177
|
});
|
|
178
178
|
const endTime = new Date(lastTimestampMs);
|
|
179
179
|
encodeMesg(Profile.MesgNum.EVENT, {
|
|
@@ -467,7 +467,7 @@ let FreeRideDisplayService = (() => {
|
|
|
467
467
|
];
|
|
468
468
|
}
|
|
469
469
|
getMapCenter() {
|
|
470
|
-
if (!this.optionsVisible || !this.currentOptions)
|
|
470
|
+
if (!this.optionsVisible || !this.currentOptions?.length)
|
|
471
471
|
return;
|
|
472
472
|
const { lat, lng } = this.currentOptions[0].path[0];
|
|
473
473
|
return { lat, lng };
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "incyclist-services",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.5",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"gd-eventlog": "^0.1.27"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@garmin/fitsdk": "^21.217.0",
|
|
9
9
|
"axios": "^1.20.0",
|
|
10
|
-
"incyclist-devices": "^3.0.
|
|
10
|
+
"incyclist-devices": "^3.0.41",
|
|
11
11
|
"promise.any": "^2.0.6",
|
|
12
12
|
"semver": "^7.7.4",
|
|
13
13
|
"tcx-builder": "^1.1.1",
|