add sport e_biking

This commit is contained in:
Manuel 2024-06-19 17:10:55 +02:00
parent 2adf6c7f8c
commit f70e79d7e1

View File

@ -41,7 +41,7 @@ def processFIT(filename):
file = FitFile(path+filename)
for record in file.get_messages("session"):
## nur wenn Radfahren
if record.get_value("sport") == "cycling":
if record.get_value("sport") == "cycling" or record.get_value("sport") == "e_biking":
## Verarbeitung starten
doAll(file)
@ -61,6 +61,7 @@ def doAll(file):
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")
fitData["total_calories"] = record.get_value("total_calories")
if record.get_value("max_altitude"):
fitData["max_altitude"] = round(float(record.get_value("max_altitude")), 1)
@ -141,4 +142,4 @@ def deleteFiles(filename):
if __name__ == '__main__':
main()