[chronojump] all encoder will not use first positive int on ecc (now does correctly like paint)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] all encoder will not use first positive int on ecc (now does correctly like paint)
- Date: Tue, 21 Jul 2015 20:15:37 +0000 (UTC)
commit 3ac698dc150fd27b1756f9ddd236a91f6d5ad123
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jul 21 22:10:13 2015 +0200
all encoder will not use first positive int on ecc (now does correctly like paint)
encoder/graph.R | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 4108aa6..f0ae50b 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -356,7 +356,11 @@ findCurvesNew <- function(displacement, eccon, isInertial, min_height, draw, tit
startHStored[count] = startHStoredOld[i]
count = count +1
}
+ }
+
+ if( isInertial && (eccon == "ec" || eccon == "ecS") )
+ {
#be careful on ec inertial to send an startStored of 1220.5 because can use the 1220 that can
be a positive displacement
#and then the 1221 can be negative and also the rest
#then is better to take the second number (do ceiling) to avoid a change of direction on the
beginning of the movement
@@ -371,10 +375,8 @@ findCurvesNew <- function(displacement, eccon, isInertial, min_height, draw, tit
# On this example a ec can go from B to C. If it uses A,
#then there will be a change of direction that will make getSpeed to produce a mistaken spline
- if(isInertial) {
- for(i in 1:length(startStored)) {
- startStored[i] = ceiling(startStored[i])
- }
+ for(i in 1:length(startStored)) {
+ startStored[i] = ceiling(startStored[i])
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]