Skip to content

Commit

Permalink
new Apple devices, garmin, fitbit
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Pohl committed Oct 6, 2023
1 parent 625405f commit 314256f
Show file tree
Hide file tree
Showing 16 changed files with 356 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/Device/AppleIphone15.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleIphone15 extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_IPHONE_15;
}

public function getName(): string
{
return 'iPhone 15';
}
}
27 changes: 27 additions & 0 deletions src/Device/AppleIphone15Plus.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleIphone15Plus extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_IPHONE_15_PLUS;
}

public function getName(): string
{
return 'iPhone 14 Plus';
}
}
27 changes: 27 additions & 0 deletions src/Device/AppleIphone15Pro.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleIphone15Pro extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_IPHONE_15_PRO;
}

public function getName(): string
{
return 'iPhone 15 Pro';
}
}
27 changes: 27 additions & 0 deletions src/Device/AppleIphone15ProMax.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleIphone15ProMax extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_IPHONE_15_PRO_MAX;
}

public function getName(): string
{
return 'iPhone 15 Pro Max';
}
}
32 changes: 32 additions & 0 deletions src/Device/AppleWatch9V41.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleWatch9V41 extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_WATCH_9_V_41;
}

public function getName(): string
{
return 'Watch 9 (41mm)';
}

public function hasBarometer(): bool
{
return true;
}
}
32 changes: 32 additions & 0 deletions src/Device/AppleWatch9V41Cellular.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleWatch9V41Cellular extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_WATCH_9_V_41_CELLULAR;
}

public function getName(): string
{
return 'Watch 9 (41mm) (Cellular)';
}

public function hasBarometer(): bool
{
return true;
}
}
32 changes: 32 additions & 0 deletions src/Device/AppleWatch9V45.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleWatch9V45 extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_WATCH_9_V_45;
}

public function getName(): string
{
return 'Watch 9 (45mm)';
}

public function hasBarometer(): bool
{
return true;
}
}
32 changes: 32 additions & 0 deletions src/Device/AppleWatch9V45Cellular.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleWatch9V45Cellular extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_WATCH_9_V_45_CELLULAR;
}

public function getName(): string
{
return 'Watch 9 (45mm) (Cellular)';
}

public function hasBarometer(): bool
{
return true;
}
}
32 changes: 32 additions & 0 deletions src/Device/AppleWatchUltra2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 AppleWatchUltra2 extends AbstractDevice
{
use AppleDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::APPLE_WATCH_ULTRA_2;
}

public function getName(): string
{
return 'Watch Ultra 2';
}

public function hasBarometer(): bool
{
return true;
}
}
13 changes: 13 additions & 0 deletions src/Device/DeviceProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,19 @@ class DeviceProfile extends AbstractEnum
const COROS_PACE_3 = 636;
const GARMIN_VENU_3 = 637;

const FITBIT_CHARGE_6 = 638;
const GARMIN_VIVO_ACTIVE_5 = 639;
const APPLE_WATCH_9_V_41 = 640;
const APPLE_WATCH_9_V_41_CELLULAR = 641;
const APPLE_WATCH_9_V_45_CELLULAR = 642;
const APPLE_WATCH_9_V_45 = 643;

const APPLE_WATCH_ULTRA_2 = 644;
const APPLE_IPHONE_15 = 645;
const APPLE_IPHONE_15_PRO = 646;
const APPLE_IPHONE_15_PRO_MAX = 647;
const APPLE_IPHONE_15_PLUS = 648;

public static function getSlugs(): array
{
self::generateSlugsArray();
Expand Down
27 changes: 27 additions & 0 deletions src/Device/FitbitCharge6.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 FitbitCharge6 extends AbstractDevice
{
use FitbitDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::FITBIT_CHARGE_6;
}

public function getName(): string
{
return 'Charge 6';
}
}
32 changes: 32 additions & 0 deletions src/Device/GarminVivoActive5.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

/*
* This file is part of the Runalyze Device List.
*
* (c) RUNALYZE <mail@runalyze.com>
*
* 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 GarminVivoActive5 extends AbstractDevice
{
use GarminDeviceTrait;

public function getEnum(): int
{
return DeviceProfile::GARMIN_VIVO_ACTIVE_5;
}

public function getName(): string
{
return 'vívoactive 5';
}

public function hasBarometer(): bool
{
return true;
}
}
9 changes: 9 additions & 0 deletions src/Distributor/Apple.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ public function getDeviceEnumList(): array
DeviceProfile::APPLE_WATCH_8_V_41_CELLULAR,
DeviceProfile::APPLE_WATCH_8_V_45_CELLULAR,
DeviceProfile::APPLE_WATCH_8_V_45,
DeviceProfile::APPLE_WATCH_9_V_41,
DeviceProfile::APPLE_WATCH_9_V_41_CELLULAR,
DeviceProfile::APPLE_WATCH_9_V_45_CELLULAR,
DeviceProfile::APPLE_WATCH_9_V_45,
DeviceProfile::APPLE_WATCH_S_E_40,
DeviceProfile::APPLE_WATCH_S_E_40_CELLULAR,
DeviceProfile::APPLE_WATCH_S_E_44,
Expand All @@ -69,6 +73,7 @@ public function getDeviceEnumList(): array
DeviceProfile::APPLE_WATCH_S_E_40_CELLULAR_V_2,
DeviceProfile::APPLE_WATCH_S_E_44_CELLULAR_V_2,
DeviceProfile::APPLE_WATCH_ULTRA,
DeviceProfile::APPLE_WATCH_ULTRA_2,
DeviceProfile::APPLE_IPHONE_X_S,
DeviceProfile::APPLE_IPHONE_X_S_MAX_GLOBAL,
DeviceProfile::APPLE_IPHONE_X_S_MAX,
Expand Down Expand Up @@ -101,6 +106,10 @@ public function getDeviceEnumList(): array
DeviceProfile::APPLE_IPHONE_14_PRO_MAX,
DeviceProfile::APPLE_IPHONE_13_MINI,
DeviceProfile::APPLE_IPHONE_14_PLUS,
DeviceProfile::APPLE_IPHONE_15,
DeviceProfile::APPLE_IPHONE_15_PRO,
DeviceProfile::APPLE_IPHONE_15_PLUS,
DeviceProfile::APPLE_IPHONE_15_PRO_MAX
];
}
}
1 change: 1 addition & 0 deletions src/Distributor/Fitbit.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function getDeviceEnumList(): array
DeviceProfile::FITBIT_CHARGE_3,
DeviceProfile::FITBIT_CHARGE_4,
DeviceProfile::FITBIT_CHARGE_5,
DeviceProfile::FITBIT_CHARGE_6,
DeviceProfile::FITBIT_CHARGE_H_R,
DeviceProfile::FITBIT_FLEX,
DeviceProfile::FITBIT_FLEX_2,
Expand Down
Loading

0 comments on commit 314256f

Please sign in to comment.