[chronojump] Better ending of curves on findCurvesNew
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Better ending of curves on findCurvesNew
- Date: Mon, 11 May 2015 18:34:17 +0000 (UTC)
commit b3e3ad4b3e2ae7bbcda8ac576642821edf967cb4
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 11 20:33:52 2015 +0200
Better ending of curves on findCurvesNew
encoder/graph.R | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index a533b45..c7e804e 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -233,7 +233,8 @@ findCurvesNew <- function(displacement, eccon, min_height, draw, title)
previousWasUp = FALSE
startCurrent = startFrame
- endCurrent = ( count - directionChangeCount + lastNonZero) / 2
+ #-1 are because on C# count starts at 0 and here count starts at 1
+ endCurrent = ( (count -1) - directionChangeCount + (lastNonZero -1) ) / 2
if(endCurrent > startCurrent)
{
@@ -658,6 +659,7 @@ paint <- function(displacement, eccon, xmin, xmax, yrange, knRanges, superpose,
else
smoothing = smoothingOneEC
+ write(c("paint smoothing", smoothing), stderr())
#eccons ec and ecS is the same here (only show one curve)
#receive data as cumulative sum
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]