Recognize German Health walk workouts
This commit is contained in:
+4
-3
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user