incyclist-services 1.7.132 → 1.7.134
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.
- package/lib/cjs/activities/base/utils/activity.js +0 -1
- package/lib/cjs/activities/ride/service.js +1 -1
- package/lib/cjs/devices/page/statemachine.js +0 -1
- package/lib/cjs/ride/route/FollowRouteDisplayService.js +2 -0
- package/lib/cjs/ride/route/FreeRideDisplayService.js +1 -2
- package/lib/cjs/ride/route/RLVDisplayService.js +2 -0
- package/lib/cjs/routes/base/parsers/geometry.js +0 -3
- package/lib/cjs/routes/base/utils/route.js +1 -1
- package/lib/cjs/routes/list/cards/RouteCard.js +13 -0
- package/lib/esm/activities/base/utils/activity.js +0 -1
- package/lib/esm/activities/ride/service.js +1 -1
- package/lib/esm/devices/page/statemachine.js +0 -1
- package/lib/esm/ride/route/FollowRouteDisplayService.js +2 -0
- package/lib/esm/ride/route/FreeRideDisplayService.js +1 -2
- package/lib/esm/ride/route/RLVDisplayService.js +2 -0
- package/lib/esm/routes/base/parsers/geometry.js +0 -3
- package/lib/esm/routes/base/utils/route.js +1 -1
- package/lib/esm/routes/list/cards/RouteCard.js +13 -0
- package/lib/types/routes/list/cards/RouteCard.d.ts +2 -0
- package/package.json +1 -1
|
@@ -313,7 +313,6 @@ let Activity = (() => {
|
|
|
313
313
|
return (0, monitoring_1.useOnlineStatusMonitoring)();
|
|
314
314
|
}
|
|
315
315
|
save(withDetails) {
|
|
316
|
-
console.log('~~~ SAVE REPO', this.info, withDetails);
|
|
317
316
|
return this.getRepo().save(this.info, withDetails);
|
|
318
317
|
}
|
|
319
318
|
logError(err, fn, context) {
|
|
@@ -8,12 +8,14 @@ class FollowRouteDisplayService extends GpxDisplayService_1.GpxDisplayService {
|
|
|
8
8
|
const settings = this.startSettings;
|
|
9
9
|
const rideView = this.getRideView();
|
|
10
10
|
const bikeProps = this.getBikeLogProps();
|
|
11
|
+
const smoothingLevel = this.getRouteList().getAppliedSmoothingLevel();
|
|
11
12
|
const props = {
|
|
12
13
|
mode: 'follow route',
|
|
13
14
|
rideView,
|
|
14
15
|
route: route.description.title,
|
|
15
16
|
start: settings.startPos,
|
|
16
17
|
realityFactor: `${settings.realityFactor}%`,
|
|
18
|
+
smoothingLevel,
|
|
17
19
|
showPrev: settings.showPrev,
|
|
18
20
|
finishAtEndOfLoop: settings.loopOverwrite,
|
|
19
21
|
...bikeProps
|
|
@@ -188,7 +188,6 @@ let FreeRideDisplayService = (() => {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
else {
|
|
191
|
-
console.log('# FreeRideDisplayService onTurn', this.position, { found: false });
|
|
192
191
|
}
|
|
193
192
|
delete this.turnPosition;
|
|
194
193
|
}
|
|
@@ -390,7 +389,7 @@ let FreeRideDisplayService = (() => {
|
|
|
390
389
|
return route;
|
|
391
390
|
}
|
|
392
391
|
catch (err) {
|
|
393
|
-
|
|
392
|
+
this.logError(err, 'createRoute');
|
|
394
393
|
}
|
|
395
394
|
}
|
|
396
395
|
updateRouteWithSelectedOption() {
|
|
@@ -309,11 +309,13 @@ let RLVDisplayService = (() => {
|
|
|
309
309
|
getLogProps() {
|
|
310
310
|
const bikeProps = this.getBikeLogProps();
|
|
311
311
|
const { realityFactor, startPos, endPos, segment, showPrev, loopOverwrite, nextOverwrite } = this.startSettings;
|
|
312
|
+
const smoothingLevel = this.getRouteList().getAppliedSmoothingLevel();
|
|
312
313
|
return {
|
|
313
314
|
mode: 'video',
|
|
314
315
|
route: this.getOriginalRoute().description.title,
|
|
315
316
|
showPrev,
|
|
316
317
|
realityFactor: `${realityFactor}%`,
|
|
318
|
+
smoothing: smoothingLevel,
|
|
317
319
|
start: startPos,
|
|
318
320
|
end: endPos,
|
|
319
321
|
segment,
|
|
@@ -88,9 +88,6 @@ let GeometryParser = (() => {
|
|
|
88
88
|
let video = (json.video_points ?? []).sort((a, b) => a.time - b.time);
|
|
89
89
|
geo = geo.filter((v, idx) => idx === 0 || v.distance !== geo[idx - 1].distance);
|
|
90
90
|
video = video.filter((v, idx) => idx === 0 || v.time !== video[idx - 1].time);
|
|
91
|
-
if (!video.length) {
|
|
92
|
-
console.log('# no video information');
|
|
93
|
-
}
|
|
94
91
|
const points = geo.map((g, idx) => {
|
|
95
92
|
return {
|
|
96
93
|
cnt: idx,
|
|
@@ -517,6 +517,19 @@ let RouteCard = (() => {
|
|
|
517
517
|
isSmoothingAvailable() {
|
|
518
518
|
return (0, smoothing_1.isSmoothingEligible)(this.route);
|
|
519
519
|
}
|
|
520
|
+
getPrevRidesFilter(settings) {
|
|
521
|
+
const routeHash = this.getRouteDescription()?.routeHash;
|
|
522
|
+
const routeId = routeHash ? undefined : this.getRouteDescription()?.id;
|
|
523
|
+
const smoothingLevel = this.isSmoothingAvailable() ? (settings.smoothingLevel ?? 0) : 0;
|
|
524
|
+
return {
|
|
525
|
+
routeHash,
|
|
526
|
+
routeId,
|
|
527
|
+
startPos: settings.startPos,
|
|
528
|
+
endPos: settings.endPos,
|
|
529
|
+
realityFactor: settings.realityFactor,
|
|
530
|
+
smoothingLevel,
|
|
531
|
+
};
|
|
532
|
+
}
|
|
520
533
|
adjustStartPosAvi(settings) {
|
|
521
534
|
try {
|
|
522
535
|
if (this.route.description.videoFormat === 'avi') {
|
|
@@ -5,12 +5,14 @@ export class FollowRouteDisplayService extends GpxDisplayService {
|
|
|
5
5
|
const settings = this.startSettings;
|
|
6
6
|
const rideView = this.getRideView();
|
|
7
7
|
const bikeProps = this.getBikeLogProps();
|
|
8
|
+
const smoothingLevel = this.getRouteList().getAppliedSmoothingLevel();
|
|
8
9
|
const props = {
|
|
9
10
|
mode: 'follow route',
|
|
10
11
|
rideView,
|
|
11
12
|
route: route.description.title,
|
|
12
13
|
start: settings.startPos,
|
|
13
14
|
realityFactor: `${settings.realityFactor}%`,
|
|
15
|
+
smoothingLevel,
|
|
14
16
|
showPrev: settings.showPrev,
|
|
15
17
|
finishAtEndOfLoop: settings.loopOverwrite,
|
|
16
18
|
...bikeProps
|
|
@@ -182,7 +182,6 @@ let FreeRideDisplayService = (() => {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
else {
|
|
185
|
-
console.log('# FreeRideDisplayService onTurn', this.position, { found: false });
|
|
186
185
|
}
|
|
187
186
|
delete this.turnPosition;
|
|
188
187
|
}
|
|
@@ -384,7 +383,7 @@ let FreeRideDisplayService = (() => {
|
|
|
384
383
|
return route;
|
|
385
384
|
}
|
|
386
385
|
catch (err) {
|
|
387
|
-
|
|
386
|
+
this.logError(err, 'createRoute');
|
|
388
387
|
}
|
|
389
388
|
}
|
|
390
389
|
updateRouteWithSelectedOption() {
|
|
@@ -306,11 +306,13 @@ let RLVDisplayService = (() => {
|
|
|
306
306
|
getLogProps() {
|
|
307
307
|
const bikeProps = this.getBikeLogProps();
|
|
308
308
|
const { realityFactor, startPos, endPos, segment, showPrev, loopOverwrite, nextOverwrite } = this.startSettings;
|
|
309
|
+
const smoothingLevel = this.getRouteList().getAppliedSmoothingLevel();
|
|
309
310
|
return {
|
|
310
311
|
mode: 'video',
|
|
311
312
|
route: this.getOriginalRoute().description.title,
|
|
312
313
|
showPrev,
|
|
313
314
|
realityFactor: `${realityFactor}%`,
|
|
315
|
+
smoothing: smoothingLevel,
|
|
314
316
|
start: startPos,
|
|
315
317
|
end: endPos,
|
|
316
318
|
segment,
|
|
@@ -85,9 +85,6 @@ let GeometryParser = (() => {
|
|
|
85
85
|
let video = (json.video_points ?? []).sort((a, b) => a.time - b.time);
|
|
86
86
|
geo = geo.filter((v, idx) => idx === 0 || v.distance !== geo[idx - 1].distance);
|
|
87
87
|
video = video.filter((v, idx) => idx === 0 || v.time !== video[idx - 1].time);
|
|
88
|
-
if (!video.length) {
|
|
89
|
-
console.log('# no video information');
|
|
90
|
-
}
|
|
91
88
|
const points = geo.map((g, idx) => {
|
|
92
89
|
return {
|
|
93
90
|
cnt: idx,
|
|
@@ -514,6 +514,19 @@ let RouteCard = (() => {
|
|
|
514
514
|
isSmoothingAvailable() {
|
|
515
515
|
return isSmoothingEligible(this.route);
|
|
516
516
|
}
|
|
517
|
+
getPrevRidesFilter(settings) {
|
|
518
|
+
const routeHash = this.getRouteDescription()?.routeHash;
|
|
519
|
+
const routeId = routeHash ? undefined : this.getRouteDescription()?.id;
|
|
520
|
+
const smoothingLevel = this.isSmoothingAvailable() ? (settings.smoothingLevel ?? 0) : 0;
|
|
521
|
+
return {
|
|
522
|
+
routeHash,
|
|
523
|
+
routeId,
|
|
524
|
+
startPos: settings.startPos,
|
|
525
|
+
endPos: settings.endPos,
|
|
526
|
+
realityFactor: settings.realityFactor,
|
|
527
|
+
smoothingLevel,
|
|
528
|
+
};
|
|
529
|
+
}
|
|
517
530
|
adjustStartPosAvi(settings) {
|
|
518
531
|
try {
|
|
519
532
|
if (this.route.description.videoFormat === 'avi') {
|
|
@@ -10,6 +10,7 @@ import { RoutesDbLoader } from "../loaders/db";
|
|
|
10
10
|
import { DownloadObserver } from "../../download/types";
|
|
11
11
|
import { EventLogger } from "gd-eventlog";
|
|
12
12
|
import { SmoothingGradient } from "../../base/utils/smoothing";
|
|
13
|
+
import { ActivitySearchCriteria } from "../../../activities/base/repo/types";
|
|
13
14
|
import { Unit } from "../../../i18n";
|
|
14
15
|
export declare const DEFAULT_TITLE = "Import Route";
|
|
15
16
|
export declare const DEFAULT_FILTERS: {
|
|
@@ -77,6 +78,7 @@ export declare class RouteCard extends BaseCard implements Card<Route> {
|
|
|
77
78
|
changeSettings(props: RouteSettings | UIRouteSettings): void;
|
|
78
79
|
getSmoothingPreview(level?: number): SmoothingPreview;
|
|
79
80
|
protected isSmoothingAvailable(): boolean;
|
|
81
|
+
getPrevRidesFilter(settings: UIStartSettings): ActivitySearchCriteria;
|
|
80
82
|
protected adjustStartPosAvi(settings: RouteSettings | UIStartSettings): void;
|
|
81
83
|
save(): Promise<void>;
|
|
82
84
|
delete(props?: {
|