[Pkg-running-devel] [openambit] 04/23: Make autolaps work correctly. Fixes #36

Christian Perrier bubulle at moszumanska.debian.org
Sat Jul 1 19:36:27 UTC 2017


This is an automated email from the git hooks/post-receive script.

bubulle pushed a commit to branch master
in repository openambit.

commit 16208c084fc8b1226bf60593d7e64b3a851eca06
Author: Emil Ljungdahl <emil at kratern.se>
Date:   Mon Sep 8 23:32:03 2014 +0200

    Make autolaps work correctly. Fixes #36
---
 src/openambit/logstore.cpp                  | 1 +
 src/openambit/movescount/movescountjson.cpp | 8 ++++++++
 src/openambit/movescount/movescountxml.cpp  | 1 +
 3 files changed, 10 insertions(+)

diff --git a/src/openambit/logstore.cpp b/src/openambit/logstore.cpp
index 12eb85d..7b10e34 100644
--- a/src/openambit/logstore.cpp
+++ b/src/openambit/logstore.cpp
@@ -79,6 +79,7 @@ typedef struct sample_lap_event_type_s {
 } sample_lap_event_type_t;
 
 static sample_lap_event_type_t sampleLapEventTypeNames[] = {
+    { 0x00, "Autolap" },
     { 0x01, "Manual" },
     { 0x14, "High Interval" },
     { 0x15, "Low Interval" },
diff --git a/src/openambit/movescount/movescountjson.cpp b/src/openambit/movescount/movescountjson.cpp
index bbb30b7..92f4c72 100644
--- a/src/openambit/movescount/movescountjson.cpp
+++ b/src/openambit/movescount/movescountjson.cpp
@@ -175,6 +175,14 @@ int MovesCountJSON::generateLogData(LogEntry *logEntry, QByteArray &output)
         }
         case ambit_log_sample_type_lapinfo:
             switch (sample->u.lapinfo.event_type) {
+            case 0x00: /* autolap = 5 */
+            {
+                QVariantMap tmpMap;
+                tmpMap.insert("LocalTime", dateTimeString(localBaseTime.addMSecs(sample->time)));
+                tmpMap.insert("Type", 5);
+                marksContent.append(tmpMap);
+                break;
+            }
             case 0x01: /* manual = 0 */
             case 0x16: /* interval = 0 */
             {
diff --git a/src/openambit/movescount/movescountxml.cpp b/src/openambit/movescount/movescountxml.cpp
index 523bfd1..bdcecce 100644
--- a/src/openambit/movescount/movescountxml.cpp
+++ b/src/openambit/movescount/movescountxml.cpp
@@ -42,6 +42,7 @@ static typename_lookup_entry_t sampleAltitudeSourceNames[] = {
 };
 
 static typename_lookup_entry_t sampleLapEventTypeNames[] = {
+    { 0x00, "Distance" },
     { 0x01, "Manual" },
     { 0x14, "High Interval" },
     { 0x15, "Low Interval" },

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git



More information about the Pkg-running-devel mailing list