[chronojump] Fixes on encoder capture



commit 52996f41d076653d206ede49efd1739b7824f895
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Feb 26 01:04:17 2015 +0100

    Fixes on encoder capture

 encoder/capture.R  |    1 -
 src/gui/encoder.cs |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/encoder/capture.R b/encoder/capture.R
index c37b187..559400f 100644
--- a/encoder/capture.R
+++ b/encoder/capture.R
@@ -93,7 +93,6 @@ getPositionStart <- function(input)
 uncompress <- function(curveSent)
 {
        chunks = unlist(strsplit(curveSent, " "))
-       s = NULL
        ints = NULL
        for(i in 1:length(chunks)) 
        {
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index e67c169..c948e3f 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -2186,12 +2186,12 @@ public partial class ChronoJumpWindow
                                                directionNow *= -1;
                                                directionLastMSecond *= -1;
                                                sum *= -1;
-                                               for(int j=0; j < encoderReaded.Length; j ++) {
+                                               for(int j=0; j <= i; j ++) {
                                                        encoderReaded[j] *= -1;
                                                        encoderReadedRaw[j] *= -1;
                                                }
                                                double sum2=0;
-                                               for(int j=0; j < encoderReaded.Length; j ++) {
+                                               for(int j=0; j <= i; j ++) {
                                                        sum2 += encoderReaded[j];
                                                        encoderCapturePoints[j] = new Gdk.Point(
                                                                        Convert.ToInt32(widthG * j / 
recordingTime),


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