From c46d58ea4e88d6eb64bef2edc28e158687492367 Mon Sep 17 00:00:00 2001 From: Michael Pohl Date: Wed, 1 Nov 2023 10:31:29 +0100 Subject: [PATCH] fix --- src/Device/DeviceProfile.php | 2 ++ src/Device/GarminEdge1040.php | 32 +++++++++++++++++++++++++++++ src/Device/GarminFenix7ProSolar.php | 32 +++++++++++++++++++++++++++++ src/Distributor/Garmin.php | 4 +++- src/Mapping/GarminFitSdkMapping.php | 3 ++- 5 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 src/Device/GarminEdge1040.php create mode 100644 src/Device/GarminFenix7ProSolar.php diff --git a/src/Device/DeviceProfile.php b/src/Device/DeviceProfile.php index 23f2270..bf9cf07 100644 --- a/src/Device/DeviceProfile.php +++ b/src/Device/DeviceProfile.php @@ -678,6 +678,8 @@ class DeviceProfile extends AbstractEnum const GARMIN_VIVO_MOVE_TREND = 653; const SUUNTO_RACE = 654; const GARMIN_FORETREX_801 = 655; + const GARMIN_EDGE_1040 = 656; + const GARMIN_FENIX_7_PRO_SOLAR = 657; public static function getSlugs(): array { diff --git a/src/Device/GarminEdge1040.php b/src/Device/GarminEdge1040.php new file mode 100644 index 0000000..612954a --- /dev/null +++ b/src/Device/GarminEdge1040.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Runalyze\Devices\Device; + +class GarminEdge1040 extends AbstractDevice +{ + use GarminDeviceTrait; + + public function getEnum(): int + { + return DeviceProfile::GARMIN_EDGE_1040; + } + + public function getName(): string + { + return 'Edge 1040'; + } + + public function hasBarometer(): bool + { + return true; + } +} diff --git a/src/Device/GarminFenix7ProSolar.php b/src/Device/GarminFenix7ProSolar.php new file mode 100644 index 0000000..afcc809 --- /dev/null +++ b/src/Device/GarminFenix7ProSolar.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Runalyze\Devices\Device; + +class GarminFenix7ProSolar extends AbstractDevice +{ + use GarminDeviceTrait; + + public function getEnum(): int + { + return DeviceProfile::GARMIN_FENIX_7_PRO_SOLAR; + } + + public function getName(): string + { + return 'Fenix 7 Pro Solar'; + } + + public function hasBarometer(): bool + { + return true; + } +} diff --git a/src/Distributor/Garmin.php b/src/Distributor/Garmin.php index 64e5d02..8f67cee 100644 --- a/src/Distributor/Garmin.php +++ b/src/Distributor/Garmin.php @@ -282,7 +282,9 @@ public function getDeviceEnumList(): array DeviceProfile::GARMIN_TACTIX_7_AMOLED, DeviceProfile::GARMIN_MARQ_COMMANDER_2_CARBON, DeviceProfile::GARMIN_VENU_3_S, - DeviceProfile::GARMIN_VIVO_MOVE_TREND + DeviceProfile::GARMIN_VIVO_MOVE_TREND, + DeviceProfile::GARMIN_EDGE_1040, + DeviceProfile::GARMIN_FENIX_7_PRO_SOLAR ]; } } diff --git a/src/Mapping/GarminFitSdkMapping.php b/src/Mapping/GarminFitSdkMapping.php index 3dddaaa..0aeca93 100644 --- a/src/Mapping/GarminFitSdkMapping.php +++ b/src/Mapping/GarminFitSdkMapping.php @@ -1,4 +1,3 @@ - DeviceProfile::GARMIN_EDGE_1030_PLUS, 2924 => DeviceProfile::GARMIN_EDGE_1030, 4305 => DeviceProfile::GARMIN_EDGE_1040_SOLAR, + 3841 => DeviceProfile::GARMIN_EDGE_1040, 3638 => DeviceProfile::GARMIN_ENDURO, 3872 => DeviceProfile::GARMIN_ENDURO, 4341 => DeviceProfile::GARMIN_ENDURO_2, @@ -187,6 +187,7 @@ protected function getMapping() 3905 => DeviceProfile::GARMIN_FENIX_7_S_SAPPHIRE_SOLAR, 3908 => DeviceProfile::GARMIN_FENIX_7_S_SAPPHIRE_SOLAR, 4374 => DeviceProfile::GARMIN_FENIX_7_S_PRO_SAPPHIRE_SOLAR, + 4375 => DeviceProfile::GARMIN_FENIX_7_PRO_SOLAR, 1482 => DeviceProfile::GARMIN_FORERUNNER_10, 1688 => DeviceProfile::GARMIN_FORERUNNER_10, 1903 => DeviceProfile::GARMIN_FORERUNNER_15,