[chronojump] Fixes on encoderRhythm when no clusters
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixes on encoderRhythm when no clusters
- Date: Fri, 19 Jan 2018 11:47:17 +0000 (UTC)
commit ed4361bccaa1984354dcf614b47e6960fd17d98e
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jan 19 12:40:17 2018 +0100
Fixes on encoderRhythm when no clusters
src/encoder.cs | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/encoder.cs b/src/encoder.cs
index f90b4a7..7786b7c 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -2115,17 +2115,17 @@ public class EncoderRhythmObject
public EncoderRhythmObject()
{
//default values
- EccSeconds = 0.5;
+ EccSeconds = .5;
ConSeconds = 0.5;
RestRepsSeconds = 1;
- RepsCluster = 5;
+ RepsCluster = 5; //1 is minimum value and means "no use clusters"
RestClustersSeconds = 6;
}
public bool UseClusters()
{
- return (RepsCluster > 0);
+ return (RepsCluster > 1);
}
}
public class EncoderRhythm
@@ -2199,7 +2199,7 @@ public class EncoderRhythm
TimeSpan span = DateTime.Now - lastRepetitionDT;
double totalSeconds = span.TotalSeconds;
- if(checkIfRestingBetweenClusters(totalSeconds))
+ if(ero.UseClusters() && checkIfRestingBetweenClusters(totalSeconds))
calculateClusterRestingFraction(totalSeconds);
else
calculateRepetitionFraction(totalSeconds);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]