From f70e79d7e1aa0549c8b504888da2243910955ea7 Mon Sep 17 00:00:00 2001 From: Manuel Date: Wed, 19 Jun 2024 17:10:55 +0200 Subject: [PATCH] add sport e_biking --- parseFitFiles.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parseFitFiles.py b/parseFitFiles.py index 173c01d..ec24e81 100644 --- a/parseFitFiles.py +++ b/parseFitFiles.py @@ -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() - \ No newline at end of file +