[chronojump] Encoder analyze mode 2 select reps, show also meanSpeed and meanForce



commit 0beae72b9b32c1cf56535ecb543c10b098078653
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Feb 7 18:58:51 2020 +0100

    Encoder analyze mode 2 select reps, show also meanSpeed and meanForce

 src/encoder.cs                      | 26 +++++++++++++++++++-------
 src/gui/encoderSelectRepetitions.cs |  2 ++
 2 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/src/encoder.cs b/src/encoder.cs
index e86706c2..dfe2ac03 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -914,7 +914,7 @@ public class EncoderSQL
                this.status = status;
                this.videoURL = videoURL;
                this.encoderConfiguration = encoderConfiguration;
-               this.future1 = future1; //on curves: meanPower. Better use alter table
+               this.future1 = future1; //on curves: meanPower
                this.future2 = future2; //on curves: meanSpeed
                this.future3 = future3; //on curves: meanForce
                this.exerciseName = exerciseName;
@@ -955,14 +955,15 @@ public class EncoderSQL
        }
 
        //showMeanPower is used in curves, but not in signal
-       public string [] ToStringArray (int count, bool checkboxes, bool video, bool encoderConfigPretty, 
bool showMeanPower) {
+       public string [] ToStringArray (int count, bool checkboxes, bool video, bool encoderConfigPretty, 
bool showMeanPSF)
+       {
                int all = 9;
                if(checkboxes)
                        all ++;
                if(video)
                        all++;
-               if(showMeanPower)
-                       all++;
+               if(showMeanPSF)
+                       all += 3;
 
 
                string [] str = new String [all];
@@ -977,9 +978,22 @@ public class EncoderSQL
                str[i++] = Catalog.GetString(laterality);
                str[i++] = extraWeight;
                
-               if(showMeanPower)
+               if(showMeanPSF)
+               {
                        str[i++] = future1;
 
+                       //as recording meanSpeed and meanForce is new on 2.0, show a blank cell instead of a 0
+                       if(future2 == "0")
+                               str[i++] = "";
+                       else
+                               str[i++] = future2;
+
+                       if(future3 == "0")
+                               str[i++] = "";
+                       else
+                               str[i++] = future3;
+               }
+
                if(encoderConfigPretty)
                        str[i++] = encoderConfiguration.ToStringPretty();
                else
@@ -1069,8 +1083,6 @@ public class EncoderSQL
                return lateralityOptionsEnglish[0];
        }
 
-
-
        //used in NUnit
        public string Filename
        {
diff --git a/src/gui/encoderSelectRepetitions.cs b/src/gui/encoderSelectRepetitions.cs
index 23b51417..a6f4b59f 100644
--- a/src/gui/encoderSelectRepetitions.cs
+++ b/src/gui/encoderSelectRepetitions.cs
@@ -216,6 +216,8 @@ public class EncoderSelectRepetitionsIndividualCurrentSession : EncoderSelectRep
                        "RL",
                        Catalog.GetString("Extra weight"),
                        Catalog.GetString("Mean Power"),
+                       Catalog.GetString("Mean Speed"),
+                       Catalog.GetString("Mean Force"),
                        Catalog.GetString("Encoder"),
                        Catalog.GetString("Contraction"),
                        Catalog.GetString("Date"),


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