[chronojump] Minor fix to previous commit



commit 24215b43d7882d281d045300790ec6632f82c84d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon May 4 20:26:20 2015 +0200

    Minor fix to previous commit

 encoder/graph.R |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 2a27159..9d9bb7a 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -165,7 +165,7 @@ findCurvesNew <- function(displacement, eccon, min_height, draw, title)
        directionLastMSecond = 1
        directionCompleted = -1
        previousFrameChange = 0
-       previousEnd = 0
+       previousEnd = 1
        lastNonZero = 0
 
        heightAtCurveStart = 0
@@ -224,8 +224,8 @@ findCurvesNew <- function(displacement, eccon, min_height, draw, title)
                      if(directionChangeCount > directionChangePeriod)
                      {
                              startFrame = previousEnd
-                             if(startFrame < 0)
-                                     startFrame = 0
+                             if(startFrame < 1)
+                                     startFrame = 1
 
                              #previousWasUp = ! Util.IntToBool(directionNow); #if we go now UP, then record 
previous DOWN phase
                              previousWasUp = TRUE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]