From 76931261012755de0949adb5c1677f08578f994e Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Wed, 28 Feb 2024 16:32:11 +0100 Subject: [PATCH 1/3] Fixes #343 move calories into lap --- daemon/src/bipactivitydetailparser.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/daemon/src/bipactivitydetailparser.cpp b/daemon/src/bipactivitydetailparser.cpp index b0728fde..fc44fe7a 100644 --- a/daemon/src/bipactivitydetailparser.cpp +++ b/daemon/src/bipactivitydetailparser.cpp @@ -304,13 +304,12 @@ QString BipActivityDetailParser::toTCX() out << "" << endl; out << "" << endl; out << "" << m_summary.name() << "" << endl; + out << "" << endl; ActivitySummary::meta m = m_summary.metaData("caloriesBurnt"); if (m.key == "caloriesBurnt") { out << "" << m.value << "" << endl; } - - out << "" << endl; out << "" << endl; foreach(ActivityCoordinate pos, m_activityTrack) { From cb3f5aa0d30ab38c7b095604efeb9f93f94f981b Mon Sep 17 00:00:00 2001 From: Jozef Mlich Date: Fri, 1 Mar 2024 08:47:53 +0100 Subject: [PATCH 2/3] Add steps number --- daemon/src/bipactivitydetailparser.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/daemon/src/bipactivitydetailparser.cpp b/daemon/src/bipactivitydetailparser.cpp index fc44fe7a..6a207098 100644 --- a/daemon/src/bipactivitydetailparser.cpp +++ b/daemon/src/bipactivitydetailparser.cpp @@ -330,6 +330,17 @@ QString BipActivityDetailParser::toTCX() out << "" << endl; } out << "" << endl; + + //Steps + m = m_summary.metaData("steps"); + if (m.key == "steps") { + out << "" << endl; + out << " " << endl; + out << " " << m.value << "" << endl; + out << " " << endl; + out << "" << endl; + } + out << "" << endl; //Creator From ed1765d0eb562e1cb41728f566c9e7abd8ae72aa Mon Sep 17 00:00:00 2001 From: juanro49 Date: Sat, 30 Mar 2024 00:12:13 +0100 Subject: [PATCH 3/3] Add TotalTimeSeconds, DistanceMeters, AverageHeartRateBpm and MaximumHeartRateBpm to tcx file --- daemon/src/bipactivitydetailparser.cpp | 29 +++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/daemon/src/bipactivitydetailparser.cpp b/daemon/src/bipactivitydetailparser.cpp index 6a207098..af1176ad 100644 --- a/daemon/src/bipactivitydetailparser.cpp +++ b/daemon/src/bipactivitydetailparser.cpp @@ -306,10 +306,36 @@ QString BipActivityDetailParser::toTCX() out << "" << m_summary.name() << "" << endl; out << "" << endl; - ActivitySummary::meta m = m_summary.metaData("caloriesBurnt"); + //TotalTimeSeconds + ActivitySummary::meta m = m_summary.metaData("activeSeconds"); + if (m.key == "activeSeconds") { + out << "" << m.value << "" << endl; + } + + //DistanceMeters + m = m_summary.metaData("distanceMeters"); + if (m.key == "distanceMeters") { + out << "" << m.value << "" << endl; + } + + //Calories + m = m_summary.metaData("caloriesBurnt"); if (m.key == "caloriesBurnt") { out << "" << m.value << "" << endl; } + + //AverageHeartRateBpm + m = m_summary.metaData("averageHR"); + if (m.key == "averageHR") { + out << "" << m.value << "" << endl; + } + + //MaximumHeartRateBpm + m = m_summary.metaData("maxHR"); + if (m.key == "maxHR") { + out << "" << m.value << "" << endl; + } + out << "" << endl; foreach(ActivityCoordinate pos, m_activityTrack) { @@ -329,6 +355,7 @@ QString BipActivityDetailParser::toTCX() out << "" << pos.heartRate() << "" << endl; out << "" << endl; } + out << "" << endl; //Steps