[chronojump/michrolab] SqliteForceSensorExercise.Select (selecting by elastic does not use forceResultant)



commit 34d08464351c86b643ed39e11566414ba842ed2d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jul 13 12:04:15 2022 +0200

    SqliteForceSensorExercise.Select (selecting by elastic does not use forceResultant)

 src/sqlite/forceSensor.cs | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/sqlite/forceSensor.cs b/src/sqlite/forceSensor.cs
index 0c7184c12..75ce0f2c0 100644
--- a/src/sqlite/forceSensor.cs
+++ b/src/sqlite/forceSensor.cs
@@ -614,11 +614,18 @@ class SqliteForceSensorExercise : Sqlite
                string elasticStr = "";
                if(elastic != -1)
                {
+                       /*
                        //note for elastic need: elastic = 1 && forceResultant = 1 (like 
ForceSensor.ComputeAsElastic does)
                        if (elastic == 1)
                                elasticStr = whereOrAndStr + table + ".elastic = 1 AND " + table + 
".forceResultant = 1";
                        else //elastic == 0
                                elasticStr = whereOrAndStr + " (" + table + ".elastic = 0 OR " + table + 
".forceResultant = 0)";
+                               */
+                       //since the separation between isometric and elastic, show on elastic all the elastic 
exercises (not only the resultant = 1)
+                       if (elastic == 1)
+                               elasticStr = whereOrAndStr + table + ".elastic = 1";
+                       else //elastic == 0
+                               elasticStr = whereOrAndStr + table + ".elastic = 0";
 
                        whereOrAndStr = " AND ";
                }


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