From d01184905f73e26f53d73dfdef15100b89446c40 Mon Sep 17 00:00:00 2001 From: "Sean C. Rhea" Date: Thu, 10 May 2007 16:30:01 +0000 Subject: [PATCH] fixed bug where interval length was 1 recint too short --- src/gui/RideItem.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/RideItem.cpp b/src/gui/RideItem.cpp index 40c95406a..22e2b92b0 100644 --- a/src/gui/RideItem.cpp +++ b/src/gui/RideItem.cpp @@ -179,6 +179,8 @@ RideItem::htmlSummary() while (i.hasNext()) { RawFilePoint *point = i.next(); + double secs_delta = raw->rec_int_ms / 1000.0; + if (point->interval != last_interval) { if (last_interval != UINT_MAX) { @@ -192,7 +194,6 @@ RideItem::htmlSummary() mile_start = point->miles; } - double secs_delta = raw->rec_int_ms / 1000.0; if ((point->mph > 0.0) || (point->cad > 0.0)) { secs_moving_or_pedaling += secs_delta; } @@ -223,7 +224,7 @@ RideItem::htmlSummary() } mile_end = point->miles; - time_end = point->secs; + time_end = point->secs + secs_delta; } summarize(intervals, last_interval, time_start,