Recognize German Health walk workouts

This commit is contained in:
2026-05-19 15:33:59 +02:00
parent 176b07f202
commit 59c7d89e81
+4 -3
View File
@@ -974,8 +974,9 @@ final class App
{ {
$normalized = normalize_sport_type_id($name); $normalized = normalize_sport_type_id($name);
return in_array($normalized, ['walking', 'walk', 'outdoor-walk', 'indoor-walk'], true) return in_array($normalized, ['walking', 'walk', 'outdoor-walk', 'indoor-walk', 'spaziergang'], true)
|| str_contains($normalized, 'walking'); || str_contains($normalized, 'walking')
|| str_contains($normalized, 'spaziergang');
} }
private function healthSportTypeForWorkout(string $name, array &$settings): array private function healthSportTypeForWorkout(string $name, array &$settings): array
@@ -1117,7 +1118,7 @@ final class App
return $points; return $points;
} }
$step = max(1, (int) floor(count($points) / 180)); $step = max(1, (int) ceil(count($points) / 180));
$reduced = []; $reduced = [];
foreach ($points as $index => $point) { foreach ($points as $index => $point) {
if ($index % $step === 0) { if ($index % $step === 0) {