[chronojump] Fixed hang on encoder R on ecc-con when minHeight is too high
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed hang on encoder R on ecc-con when minHeight is too high
- Date: Tue, 1 Mar 2022 12:47:48 +0000 (UTC)
commit e44ea5686077ae028c7a93d5973a6353bf81b68a
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Mar 1 13:44:06 2022 +0100
Fixed hang on encoder R on ecc-con when minHeight is too high
encoder/util.R | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/encoder/util.R b/encoder/util.R
index e2105c1f1..ff792e75b 100644
--- a/encoder/util.R
+++ b/encoder/util.R
@@ -678,7 +678,14 @@ kinematicsF <- function(displacement, repOp, smoothingOneEC, smoothingOneC, g, i
))
}
-findECPhases <- function(displacement,speed) {
+findECPhases <- function(displacement,speed)
+{
+ if(length(speed) == 1)
+ return(list(
+ eccentric=0,
+ isometric=0,
+ concentric=0))
+
speed.ext=extrema(speed)
#In all the extrema minindex values, search which range (row) has the min values,
@@ -691,7 +698,6 @@ findECPhases <- function(displacement,speed) {
#find the cross between both
crossMinRow=which(speed.ext$cross[,1] > searchMinSpeedEnd & speed.ext$cross[,1] < searchMaxSpeedIni)
-
eccentric = 0
isometric = 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]