Upgrade FIT SDK to 21.188 (#4776) [skip ci]

The presence of a \ in a string will produce an error in python 3.13
Using raw strings in all regexes avoids this.
This commit is contained in:
Poncho
2025-12-27 20:05:48 +01:00
committed by GitHub
parent a45bb2503c
commit 2d463c8bc2
3 changed files with 9454 additions and 9483 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@ for line in lines:
match = re.search("FIT_GARMIN_PROD", line)
if match:
name = re.search("(FIT_GARMIN_PRODUCT_)([^ \t]*)", line)
id = re.search("\(FIT_GARMIN_PRODUCT, ([ 0-9]*)", line)
id = re.search(r"\(FIT_GARMIN_PRODUCT, ([ 0-9]*)", line)
if name and id:
# extract name
print(pre+ '{ "manu":1, "prod":' + id.group(1).strip() + ', "name":"' + name.group(2).strip().replace('_',' ').title() + '" }', end="")
@@ -36,7 +36,7 @@ print("\n ],\n")
print(' "MANUFACTURERS":[')
pre=" "
for line in lines:
match = re.search("MANUFACTURER_([^ \t]*).*\(FIT_MANUFACTURER, ([ 0-9]*)", line)
match = re.search(r"MANUFACTURER_([^ \t]*).*\(FIT_MANUFACTURER, ([ 0-9]*)", line)
if match:
print(pre+ '{ "manu":' + match.group(2).strip() + ', "name":"' + match.group(1).strip().replace('_',' ').title() + '" }', end="")
pre=",\n "
@@ -59,7 +59,7 @@ for line in fieldlines:
print(' "MESSAGES":[')
pre=" "
for line in lines:
match = re.search("FIT_MESG_NUM_([^ \t]*).*\(FIT_MESG_NUM, ([ 0-9]*)", line)
match = re.search(r"FIT_MESG_NUM_([^ \t]*).*\(FIT_MESG_NUM, ([ 0-9]*)", line)
if match:
num = int(match.group(2).strip())
if num > 0: