add sport e_biking
This commit is contained in:
parent
2adf6c7f8c
commit
f70e79d7e1
@ -41,7 +41,7 @@ def processFIT(filename):
|
|||||||
file = FitFile(path+filename)
|
file = FitFile(path+filename)
|
||||||
for record in file.get_messages("session"):
|
for record in file.get_messages("session"):
|
||||||
## nur wenn Radfahren
|
## nur wenn Radfahren
|
||||||
if record.get_value("sport") == "cycling":
|
if record.get_value("sport") == "cycling" or record.get_value("sport") == "e_biking":
|
||||||
## Verarbeitung starten
|
## Verarbeitung starten
|
||||||
doAll(file)
|
doAll(file)
|
||||||
|
|
||||||
@ -61,6 +61,7 @@ def doAll(file):
|
|||||||
fitData["total_distance"] = round(record.get_value("total_distance") / 1000, 1)
|
fitData["total_distance"] = round(record.get_value("total_distance") / 1000, 1)
|
||||||
#fitData["date"] = record.get_value("start_time").strftime("%d.%m.%Y")
|
#fitData["date"] = record.get_value("start_time").strftime("%d.%m.%Y")
|
||||||
fitData["date"] = record.get_value("start_time")
|
fitData["date"] = record.get_value("start_time")
|
||||||
|
|
||||||
fitData["total_calories"] = record.get_value("total_calories")
|
fitData["total_calories"] = record.get_value("total_calories")
|
||||||
if record.get_value("max_altitude"):
|
if record.get_value("max_altitude"):
|
||||||
fitData["max_altitude"] = round(float(record.get_value("max_altitude")), 1)
|
fitData["max_altitude"] = round(float(record.get_value("max_altitude")), 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user