[chronojump/FS-TFT-Menu] Encoder overview reps (grav or inertial) show also meanSpeed, meanForce (was only showing meanPower)



commit 2a4eb6ee71d40659b7f459678e63f414c322062a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 6 12:10:07 2022 +0200

    Encoder overview reps (grav or inertial) show also meanSpeed, meanForce (was only showing meanPower)

 src/gui/overview.cs   | 14 ++++++++------
 src/sqlite/encoder.cs | 12 +++++++-----
 2 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/src/gui/overview.cs b/src/gui/overview.cs
index 17af7200d..677ff96d0 100644
--- a/src/gui/overview.cs
+++ b/src/gui/overview.cs
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- *  Copyright (C) 2016-2020   Xavier de Blas <xaviblas gmail com>
+ *  Copyright (C) 2016-2022   Xavier de Blas <xaviblas gmail com>
  */
 
 using System;
@@ -257,9 +257,9 @@ public class EncoderOverviewWindow : OverviewWindow
        protected override ArrayList selectData(treeviewType type)
        {
                if(type == treeviewType.SETS)
-                       return SqliteEncoder.SelectSessionOverviewSets(false, encoderGI, sessionID);
+                       return SqliteEncoder.SelectSessionOverviewSets (false, encoderGI, sessionID);
                else
-                       return SqliteEncoder.SelectSessionOverviewReps(false, encoderGI, sessionID);
+                       return SqliteEncoder.SelectSessionOverviewReps (false, encoderGI, sessionID);
        }
 
        protected override void createTreeView(Gtk.TreeView tv, treeviewType type)
@@ -291,6 +291,8 @@ public class EncoderOverviewWindow : OverviewWindow
                                tv.AppendColumn (Catalog.GetString ("Extra mass"), new CellRendererText(), 
"text", count++);
 
                        tv.AppendColumn (Catalog.GetString ("Power"), new CellRendererText(), "text", 
count++);
+                       tv.AppendColumn (Catalog.GetString ("Speed"), new CellRendererText(), "text", 
count++);
+                       tv.AppendColumn (Catalog.GetString ("Force"), new CellRendererText(), "text", 
count++);
                }
        }
 
@@ -300,14 +302,14 @@ public class EncoderOverviewWindow : OverviewWindow
                if(type == treeviewType.SETS)
                {
                        if(encoderGI == Constants.EncoderGI.GRAVITATORY)
-                               s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string), typeof(string)); //personID (hidden), person name, sex, 
encoderConfiguration, exercise, displaced mass, sets
+                               s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string), typeof (string)); //personID (hidden), person name, sex, 
encoderConfiguration, exercise, displaced mass, sets
                        else
                                s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string)); //personID (hidden), person name, sex, encoderConfiguration, 
exercise, sets
                } else {
                        if(encoderGI == Constants.EncoderGI.GRAVITATORY)
-                               s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string), typeof(string)); //personID (hidden), person name, sex, 
encoderConfiguration, exercise, extra mass, power
+                               s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string)); //personID 
(hidden), person name, sex, encoderConfiguration, exercise, extra mass, power, speed, force
                        else
-                               s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string)); //personID (hidden), person name, sex, encoderConfiguration, 
exercise, power
+                               s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof 
(string), typeof (string), typeof (string), typeof (string), typeof (string)); //personID (hidden), person 
name, sex, encoderConfiguration, exercise, power, speed, force
                }
 
                return s;
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 1904365ae..3d59f50e0 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -576,7 +576,7 @@ class SqliteEncoder : Sqlite
                        Sqlite.Open();
 
                dbcmd.CommandText =
-                       "SELECT person77.uniqueID, person77.name, person77.sex, encoder.encoderConfiguration, 
encoderExercise.name, encoder.extraWeight, encoder.future1 " + //TODO: future2, future3
+                       "SELECT person77.uniqueID, person77.name, person77.sex, encoder.encoderConfiguration, 
encoderExercise.name, encoder.extraWeight, encoder.future1, encoder.future2, encoder.future3 " +
                        "FROM person77, encoderExercise, encoder " +
                        "WHERE sessionID = " + sessionID.ToString() +
                        " AND signalOrCurve = \"curve\" " +
@@ -613,8 +613,9 @@ class SqliteEncoder : Sqlite
                                        econf.ToStringPretty(), //encoder configuration
                                        reader[4].ToString(),   //encoder exercise name
                                        Util.ChangeDecimalSeparator(reader[5].ToString()),      //extra mass
-                                       reader[6].ToString()    //power
-                                               //TODO: speed, force
+                                       reader[6].ToString(),   //power
+                                       reader[7].ToString(),   //speed
+                                       reader[8].ToString()    //force
                                };
                                array.Add (s);
                        } else {
@@ -624,8 +625,9 @@ class SqliteEncoder : Sqlite
                                        reader[2].ToString(),   //person sex
                                        econf.ToStringPretty(), //encoder configuration
                                        reader[4].ToString(),   //encoder exercise name
-                                       reader[6].ToString()    //power
-                                               //TODO: speed, force
+                                       reader[6].ToString(),   //power
+                                       reader[7].ToString(),   //speed
+                                       reader[8].ToString()    //force
                                };
                                array.Add (s);
                        }


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