[chronojump] DB:2.07 Added into preferences: forceSensorVariabilityMethod
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DB:2.07 Added into preferences: forceSensorVariabilityMethod
- Date: Fri, 18 Dec 2020 14:55:24 +0000 (UTC)
commit 5942723bfbd8c564c533172163f5bd257717a73f
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Dec 18 15:54:48 2020 +0100
DB:2.07 Added into preferences: forceSensorVariabilityMethod
src/preferences.cs | 2 ++
src/sqlite/main.cs | 12 +++++++++++-
src/sqlite/preferences.cs | 5 +++++
3 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/src/preferences.cs b/src/preferences.cs
index 3277684c..e1beff5c 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -123,6 +123,8 @@ public class Preferences
public int forceSensorNotElasticEccMinForce;
public int forceSensorNotElasticConMinForce;
public int forceSensorGraphsLineWidth;
+ public enum VariabilityMethodEnum { CHRONOJUMP_OLD, CVRMSSD };
+ public VariabilityMethodEnum forceSensorVariabilityMethod;
//runEncoder
public double runEncoderMinAccel;
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 491f83f1..cf6c1759 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -129,7 +129,7 @@ class Sqlite
/*
* Important, change this if there's any update to database
*/
- static string lastChronojumpDatabaseVersion = "2.06";
+ static string lastChronojumpDatabaseVersion = "2.07";
public Sqlite()
{
@@ -2825,6 +2825,15 @@ class Sqlite
currentVersion = updateVersion("2.06");
}
+ if(currentVersion == "2.06")
+ {
+ LogB.SQL("Inserted into preferences: forceSensorVariabilityMethod");
+
+ SqlitePreferences.Insert (SqlitePreferences.ForceSensorVariabilityMethod,
+ Preferences.VariabilityMethodEnum.CVRMSSD.ToString());
+
+ currentVersion = updateVersion("2.07");
+ }
/*
if(currentVersion == "1.79")
@@ -3042,6 +3051,7 @@ class Sqlite
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
+ //2.06 - 2.07 Converted DB to 2.07 Inserted into preferences: forceSensorVariabilityMethod
//2.05 - 2.06 Converted DB to 2.06 Default python version for all users: Python3
//2.04 - 2.05 Converted DB to 2.05 Inserted into preferences: forceSensorStartEndOptimized
//2.03 - 2.04 Converted DB to 2.04 Created tables: tagSession, sessionTagSession
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 9a584008..78ce1c86 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -81,6 +81,7 @@ class SqlitePreferences : Sqlite
public const string ForceSensorNotElasticEccMinForce = "forceSensorNotElasticEccMinForce";
public const string ForceSensorNotElasticConMinForce = "forceSensorNotElasticConMinForce";
public const string ForceSensorGraphsLineWidth = "forceSensorGraphsLineWidth";
+ public const string ForceSensorVariabilityMethod = "forceSensorVariabilityMethod";
public const string ForceSensorTareDateTimeStr = "forceSensorTareDateTime";
public const string ForceSensorTareStr = "forceSensorTare";
@@ -266,6 +267,7 @@ class SqlitePreferences : Sqlite
Insert (ForceSensorNotElasticEccMinForce, "100", dbcmdTr);
Insert (ForceSensorNotElasticConMinForce, "100", dbcmdTr);
Insert (ForceSensorGraphsLineWidth, "2", dbcmdTr);
+ Insert (ForceSensorVariabilityMethod,
Preferences.VariabilityMethodEnum.CVRMSSD.ToString(), dbcmdTr);
Insert (ForceSensorCaptureFeedbackActive, "False", dbcmdTr);
Insert (ForceSensorCaptureFeedbackAt, "100", dbcmdTr);
Insert (ForceSensorCaptureFeedbackRange, "40", dbcmdTr);
@@ -648,6 +650,9 @@ class SqlitePreferences : Sqlite
preferences.forceSensorNotElasticConMinForce =
Convert.ToInt32(reader[1].ToString());
else if(reader[0].ToString() == ForceSensorGraphsLineWidth)
preferences.forceSensorGraphsLineWidth =
Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ForceSensorVariabilityMethod)
+ preferences.forceSensorVariabilityMethod = (Preferences.VariabilityMethodEnum)
+ Enum.Parse(typeof(Preferences.VariabilityMethodEnum),
reader[1].ToString());
else if(reader[0].ToString() == ForceSensorCaptureFeedbackActive)
preferences.forceSensorCaptureFeedbackActive = reader[1].ToString() == "True";
else if(reader[0].ToString() == ForceSensorCaptureFeedbackAt)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]