python-fitparse 2.1.6__tar.gz → 2.2.0__tar.gz
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.
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/PKG-INFO +2 -2
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/README.md +1 -1
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/fitparse/profile.py +13 -3
- python_fitparse-2.2.0/patches/message_types/stress_level.py +25 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/pyproject.toml +1 -1
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/scripts/generate_profile.py +13 -1
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/.gitignore +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/LICENSE +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/fitparse/__init__.py +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/fitparse/base.py +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/fitparse/processors.py +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/fitparse/records.py +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/fitparse/utils.py +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/patches/message_types/location.py +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/scripts/fitdump +0 -0
- {python_fitparse-2.1.6 → python_fitparse-2.2.0}/scripts/unit_tool.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-fitparse
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Python library to parse ANT/Garmin .FIT files
|
|
5
5
|
Project-URL: Homepage, https://github.com/nbr23/python-fitparse
|
|
6
6
|
Project-URL: Repository, https://github.com/nbr23/python-fitparse
|
|
@@ -54,7 +54,7 @@ python-fitparse
|
|
|
54
54
|
> This fork continues active development with support for new FIT SDK versions and patches.
|
|
55
55
|
|
|
56
56
|
Here's a Python library to parse ANT/Garmin `.FIT` files.
|
|
57
|
-
[](https://github.com/nbr23/python-fitparse/actions?query=workflow%3A%22Main+CI%2FCD+Pipeline%22)
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
Install from [](https://pypi.python.org/pypi/python-fitparse/):
|
|
@@ -6,7 +6,7 @@ python-fitparse
|
|
|
6
6
|
> This fork continues active development with support for new FIT SDK versions and patches.
|
|
7
7
|
|
|
8
8
|
Here's a Python library to parse ANT/Garmin `.FIT` files.
|
|
9
|
-
[](https://github.com/nbr23/python-fitparse/actions?query=workflow%3A%22Main+CI%2FCD+Pipeline%22)
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
Install from [](https://pypi.python.org/pypi/python-fitparse/):
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# ***************** BEGIN AUTOMATICALLY GENERATED FIT PROFILE ******************
|
|
2
2
|
# *************************** DO NOT EDIT THIS FILE ****************************
|
|
3
|
-
# *********** EXPORTED PROFILE FROM SDK VERSION 21.
|
|
4
|
-
# ********* PARSED 201 TYPES (
|
|
3
|
+
# *********** EXPORTED PROFILE FROM SDK VERSION 21.205 ON 2026-06-02 ***********
|
|
4
|
+
# ********* PARSED 201 TYPES (4399 VALUES), 124 MESSAGES (1412 FIELDS) *********
|
|
5
5
|
|
|
6
6
|
from fitparse.records import (
|
|
7
7
|
ComponentField,
|
|
@@ -2230,9 +2230,13 @@ FIELD_TYPES = {
|
|
|
2230
2230
|
4759: 'instinct3_solar_50mm',
|
|
2231
2231
|
4775: 'tactix8_amoled',
|
|
2232
2232
|
4776: 'tactix8_solar',
|
|
2233
|
+
4814: 'fr170_music',
|
|
2234
|
+
4815: 'fr170',
|
|
2233
2235
|
4825: 'approach_j1',
|
|
2234
2236
|
4879: 'd2_mach2',
|
|
2237
|
+
4916: 'fr70_2026',
|
|
2235
2238
|
4944: 'd2_air_x15',
|
|
2239
|
+
5056: 'd2_mach2_pro',
|
|
2236
2240
|
10007: 'sdm4', # SDM4 footpod
|
|
2237
2241
|
10014: 'edge_remote',
|
|
2238
2242
|
20119: 'training_center',
|
|
@@ -11844,6 +11848,12 @@ MESSAGE_TYPES = {
|
|
|
11844
11848
|
def_num=1,
|
|
11845
11849
|
units='s',
|
|
11846
11850
|
),
|
|
11851
|
+
3: Field( # Undocumented Garmin Body Battery level (0-100)
|
|
11852
|
+
name='body_battery',
|
|
11853
|
+
type=BASE_TYPES[0x01], # sint8
|
|
11854
|
+
def_num=3,
|
|
11855
|
+
units='percent',
|
|
11856
|
+
),
|
|
11847
11857
|
},
|
|
11848
11858
|
),
|
|
11849
11859
|
229: MessageType(
|
|
@@ -12192,7 +12202,7 @@ MESSAGE_TYPES = {
|
|
|
12192
12202
|
type=BASE_TYPES[0x84], # uint16
|
|
12193
12203
|
def_num=1,
|
|
12194
12204
|
scale=1000,
|
|
12195
|
-
units='
|
|
12205
|
+
units='C',
|
|
12196
12206
|
),
|
|
12197
12207
|
253: FIELD_TYPE_TIMESTAMP,
|
|
12198
12208
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# patches/message_types/stress_level.py
|
|
2
|
+
import sys
|
|
3
|
+
import os
|
|
4
|
+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'scripts'))
|
|
5
|
+
from generate_profile import MessageInfo, FieldInfo
|
|
6
|
+
|
|
7
|
+
MESSAGE_INFO = MessageInfo(
|
|
8
|
+
name='stress_level',
|
|
9
|
+
num=227,
|
|
10
|
+
group_name='',
|
|
11
|
+
fields=[
|
|
12
|
+
FieldInfo(
|
|
13
|
+
name='body_battery',
|
|
14
|
+
type='sint8',
|
|
15
|
+
num=3,
|
|
16
|
+
scale=None,
|
|
17
|
+
offset=None,
|
|
18
|
+
units='percent',
|
|
19
|
+
components=[],
|
|
20
|
+
subfields=[],
|
|
21
|
+
comment='Undocumented Garmin Body Battery level (0-100)'
|
|
22
|
+
),
|
|
23
|
+
],
|
|
24
|
+
comment=''
|
|
25
|
+
)
|
|
@@ -318,6 +318,12 @@ class ReferenceFieldInfo(namedtuple('ReferenceFieldInfo', ('name', 'value', 'num
|
|
|
318
318
|
return s
|
|
319
319
|
|
|
320
320
|
|
|
321
|
+
def normalize_def_num(num):
|
|
322
|
+
if isinstance(num, str):
|
|
323
|
+
return int(num, 16)
|
|
324
|
+
return num
|
|
325
|
+
|
|
326
|
+
|
|
321
327
|
def render_comment(comment):
|
|
322
328
|
if comment:
|
|
323
329
|
return ' # %s' % comment
|
|
@@ -662,7 +668,13 @@ def apply_patches(type_list, message_list):
|
|
|
662
668
|
message_list.messages.append(patch_message_info)
|
|
663
669
|
print(f" Added message type: {patch_message_info.name} (num: {patch_num})")
|
|
664
670
|
else:
|
|
665
|
-
|
|
671
|
+
existing_nums = {normalize_def_num(f.num) for f in existing_message.fields}
|
|
672
|
+
for patch_field in patch_message_info.fields:
|
|
673
|
+
if normalize_def_num(patch_field.num) in existing_nums:
|
|
674
|
+
print(f" Skipped field: {existing_message.name}.{patch_field.name} (def_num {patch_field.num} already defined)")
|
|
675
|
+
else:
|
|
676
|
+
existing_message.fields.append(patch_field)
|
|
677
|
+
print(f" Added field: {existing_message.name}.{patch_field.name} (def_num {patch_field.num})")
|
|
666
678
|
|
|
667
679
|
|
|
668
680
|
def download_latest_sdk(path):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|