[chronojump/michrolab] Fixed SqliteForceSensor.Select (elastic according to elastic and forceResultant)
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] Fixed SqliteForceSensor.Select (elastic according to elastic and forceResultant)
- Date: Thu, 14 Jul 2022 16:37:51 +0000 (UTC)
commit 4f4edcadcd715877bd797446cef9fa582b85a7fa
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri May 27 19:36:33 2022 +0200
Fixed SqliteForceSensor.Select (elastic according to elastic and forceResultant)
src/sqlite/forceSensor.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/sqlite/forceSensor.cs b/src/sqlite/forceSensor.cs
index dcd26cd1b..11e1af839 100644
--- a/src/sqlite/forceSensor.cs
+++ b/src/sqlite/forceSensor.cs
@@ -606,7 +606,12 @@ class SqliteForceSensorExercise : Sqlite
string elasticStr = "";
if(elastic != -1)
{
- elasticStr = whereOrAndStr + table + ".elastic = " + elastic;
+ //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";
+
whereOrAndStr = " AND ";
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]