[chronojump] Encoder propulsive line is always shown on instant graphs (not only when accel is shown)



commit 93da2e27166e6e80cca2e926169af0ea78adff00
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Jan 8 12:09:26 2019 +0100

    Encoder propulsive line is always shown on instant graphs (not only when accel is shown)

 encoder/graph.R | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index f856bf9a..bc261617 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -902,13 +902,13 @@ paint <- function(displacement, eccon, xmin, xmax, xrange, yrange, knRanges, pai
                 }
 
                 #show propulsive stuff if line if differentiation is relevant (propulsivePhase ends before 
the end of the movement)
-                if(showAccel && isPropulsive & propulsiveEnd < length(displacement)) {
-                        #propulsive stuff
-                        segments(0,-9.81,length(accel$y),-9.81,lty=3,col="magenta")
-                        #abline(v=propulsiveEnd,lty=3,col="magenta")
+                if(isPropulsive & propulsiveEnd < length(displacement)) {
                         abline(v=propulsiveEnd,lty=1,col=cols[2])
-                        points(propulsiveEnd, -g, col="magenta")
-                        text(x=length(accel$y),y=-9.81,labels=" g",cex=1,adj=c(0,0),col="magenta")
+                       if(showAccel) {
+                               segments(0,-9.81,length(accel$y),-9.81,lty=3,col="magenta")
+                               points(propulsiveEnd, -g, col="magenta")
+                               text(x=length(accel$y),y=-9.81,labels=" g",cex=1,adj=c(0,0),col="magenta")
+                       }
                 }
                 
                 if(showAxes & showAccel) {


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