[chronojump] Fixed encoder landing detection



commit 886a193263695ee330221a849df86a8d865d613c
Author: Xavier Padullés <x padulles gmail com>
Date:   Mon Sep 19 15:28:02 2016 +0200

    Fixed encoder landing detection

 encoder/graph.R |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 2f85b12..616f952 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -843,10 +843,10 @@ paint <- function(displacement, eccon, xmin, xmax, yrange, knRanges, superpose,
                if(eccon=="ec") {
                        #landing = min(which(force>=weight))
                
-                       if(! canJump(encoderConfigurationName) || length(which(force[eccentric] <= weight)) 
== 0)
+                       if(! canJump(encoderConfigurationName) || length(which(force[eccentric] <= 0)) == 0)
                                landing = -1
                        else {
-                               landing = max(which(force[eccentric]<=weight))
+                               landing = max(which(force[eccentric]<= 0))
                                abline(v=landing,lty=1,col=cols[2]) 
                                mtext(text=paste(translateToPrint("air")," 
",sep=""),side=3,at=landing,cex=.8,adj=1,col=cols[2])
                                mtext(text=paste(" ",translateToPrint("land")," 
",sep=""),side=3,at=landing,cex=.8,adj=0,col=cols[2])


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