[chronojump] Safest findSmoothingsEC
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Safest findSmoothingsEC
- Date: Wed, 25 May 2016 19:02:00 +0000 (UTC)
commit 82167f1b368e9bbfae4e36a3c173cd6d4906b786
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed May 25 20:51:23 2016 +0200
Safest findSmoothingsEC
encoder/graphSmoothingEC.R | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/encoder/graphSmoothingEC.R b/encoder/graphSmoothingEC.R
index b7e90e8..c01f24d 100644
--- a/encoder/graphSmoothingEC.R
+++ b/encoder/graphSmoothingEC.R
@@ -133,6 +133,10 @@ findSmoothingsEC <- function(singleFile, displacement, curves, eccon, smoothingO
#1 get max power concentric at concentric phase with current smoothing
+ if(length(unique(concentric)) < 4 ) {
+ smoothings[i] = smoothingOneC
+ next
+ }
speed <- getSpeed(concentric, smoothingOneC)
#assign values from Roptions.txt (singleFile), or from curves
@@ -189,6 +193,10 @@ findSmoothingsEC <- function(singleFile, displacement, curves, eccon, smoothingO
#check how it worked
+ if(length(unique(eccentric.concentric)) < 4 ) {
+ smoothings[i] = smoothingOneEC
+ next
+ }
speed <- getSpeed(eccentric.concentric, smoothingOneEC)
if(! isInertial(myEncoderConfigurationName) )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]