[chronojump] DB: 2.22 Inserted forceSensorFeedbackPath params
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DB: 2.22 Inserted forceSensorFeedbackPath params
- Date: Thu, 27 May 2021 15:59:48 +0000 (UTC)
commit eea5dc5abb8ae797f09411671df4e5b0148f5ebb
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu May 27 17:59:04 2021 +0200
DB: 2.22 Inserted forceSensorFeedbackPath params
src/preferences.cs | 20 +++++++++++++++-----
src/sqlite/main.cs | 15 ++++++++++++++-
src/sqlite/preferences.cs | 31 ++++++++++++++++++++++++++++---
3 files changed, 57 insertions(+), 9 deletions(-)
---
diff --git a/src/preferences.cs b/src/preferences.cs
index eade633cd..9e1614c07 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -246,16 +246,26 @@ public class Preferences
public string forceSensorCalibrationDateTime;
public double forceSensorCalibrationWeight;
public double forceSensorCalibrationFactor;
- public enum ForceSensorCaptureFeedbackActiveEnum { NO, RECTANGLE, PATH };
- public ForceSensorCaptureFeedbackActiveEnum forceSensorCaptureFeedbackActive; //rectangle
- public int forceSensorCaptureFeedbackAt; //rectangle
- public int forceSensorCaptureFeedbackRange; //rectangle
public bool forceSensorStartEndOptimized;
public enum ForceSensorMIFDurationModes { SECONDS, PERCENT };
public ForceSensorMIFDurationModes forceSensorMIFDurationMode;
public double forceSensorMIFDurationSeconds;
public int forceSensorMIFDurationPercent;
-
+
+ //forceSensor feedback
+ public enum ForceSensorCaptureFeedbackActiveEnum { NO, RECTANGLE, PATH };
+ //rectangle
+ public ForceSensorCaptureFeedbackActiveEnum forceSensorCaptureFeedbackActive;
+ public int forceSensorCaptureFeedbackAt;
+ public int forceSensorCaptureFeedbackRange;
+ //path
+ public int forceSensorFeedbackPathMax;
+ public int forceSensorFeedbackPathMin;
+ public int forceSensorFeedbackPathMasters;
+ public int forceSensorFeedbackPathMasterSeconds;
+ public int forceSensorFeedbackPathLineWidth;
+
+
public int encoderCaptureTimeIM = 180; //hardcoded 3 minutes.
public enum GstreamerTypes { GST_0_1, GST_1_0, FFPLAY, SYSTEMSOUNDS };
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 896352354..81a0faab4 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.21";
+ static string lastChronojumpDatabaseVersion = "2.22";
public Sqlite()
{
@@ -2998,6 +2998,18 @@ class Sqlite
currentVersion = updateVersion("2.21");
}
+ if(currentVersion == "2.21")
+ {
+ LogB.SQL("Inserted forceSensorFeedbackPath params");
+
+ SqlitePreferences.Insert (SqlitePreferences.ForceSensorFeedbackPathMax,
"100");
+ SqlitePreferences.Insert (SqlitePreferences.ForceSensorFeedbackPathMin, "0");
+ SqlitePreferences.Insert (SqlitePreferences.ForceSensorFeedbackPathMasters,
"8");
+ SqlitePreferences.Insert
(SqlitePreferences.ForceSensorFeedbackPathMasterSeconds, "2");
+ SqlitePreferences.Insert (SqlitePreferences.ForceSensorFeedbackPathLineWidth,
"33");
+
+ currentVersion = updateVersion("2.22");
+ }
@@ -3220,6 +3232,7 @@ class Sqlite
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
+ //2.21 - 2.22 Converted DB to 2.22 Inserted forceSensorFeedbackPath params
//2.20 - 2.21 Converted DB to 2.21 Inserted into preferences: runsEvolutionShowTime
//2.19 - 2.20 Converted DB to 2.20 Inserted into preferences: runsEvolutionOnlyBestInSession
//2.18 - 2.19 Converted DB to 2.19 Doing alter table encoderExercise ADD COLUMN type TEXT ...
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 5fe88199e..48a2733cc 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -100,9 +100,6 @@ class SqlitePreferences : Sqlite
public const string ForceSensorCalibrationDateTimeStr = "forceSensorCalibrationDateTime";
public const string ForceSensorCalibrationWeightStr = "forceSensorCalibrationWeight";
public const string ForceSensorCalibrationFactorStr = "forceSensorCalibrationFactor";
- public const string ForceSensorCaptureFeedbackActive = "forceSensorCaptureFeedbackActive";
- public const string ForceSensorCaptureFeedbackAt = "forceSensorCaptureFeedbackAt";
- public const string ForceSensorCaptureFeedbackRange = "forceSensorCaptureFeedbackRange";
public const string ForceSensorStartEndOptimized = "forceSensorStartEndOptimized";
public const string ForceSensorMIFDurationMode = "forceSensorMIFDurationMode";
public const string ForceSensorMIFDurationSeconds = "forceSensorMIFDurationSeconds";
@@ -110,6 +107,18 @@ class SqlitePreferences : Sqlite
public const string ForceSensorAnalyzeABSliderIncrement = "forceSensorAnalyzeABSliderIncrement";
public const string ForceSensorAnalyzeMaxAVGInWindow = "forceSensorAnalyzeMaxAVGInWindow";
+ //forceSensor feedback
+ public const string ForceSensorCaptureFeedbackActive = "forceSensorCaptureFeedbackActive";
+ //rectangle
+ public const string ForceSensorCaptureFeedbackAt = "forceSensorCaptureFeedbackAt";
+ public const string ForceSensorCaptureFeedbackRange = "forceSensorCaptureFeedbackRange";
+ //path
+ public const string ForceSensorFeedbackPathMax = "forceSensorFeedbackPathMax";
+ public const string ForceSensorFeedbackPathMin = "forceSensorFeedbackPathMin";
+ public const string ForceSensorFeedbackPathMasters = "forceSensorFeedbackPathMasters";
+ public const string ForceSensorFeedbackPathMasterSeconds = "forceSensorFeedbackPathMasterSeconds";
+ public const string ForceSensorFeedbackPathLineWidth = "forceSensorFeedbackPathLineWidth";
+
//runEncoder
public const string RunEncoderMinAccel = "runEncoderMinAccel";
public const string RunEncoderPPS = "runEncoderPPS";
@@ -297,6 +306,12 @@ class SqlitePreferences : Sqlite
Insert (ForceSensorCaptureFeedbackActive,
Preferences.ForceSensorCaptureFeedbackActiveEnum.NO.ToString(), dbcmdTr);
Insert (ForceSensorCaptureFeedbackAt, "100", dbcmdTr);
Insert (ForceSensorCaptureFeedbackRange, "40", dbcmdTr);
+ Insert (ForceSensorFeedbackPathMax, "100", dbcmdTr);
+ Insert (ForceSensorFeedbackPathMin, "0", dbcmdTr);
+ Insert (ForceSensorFeedbackPathMasters, "8", dbcmdTr);
+ Insert (ForceSensorFeedbackPathMasterSeconds, "2", dbcmdTr);
+ Insert (ForceSensorFeedbackPathLineWidth, "33", dbcmdTr);
+
Insert (ForceSensorTareDateTimeStr, "", dbcmdTr);
Insert (ForceSensorTareStr, "-1", dbcmdTr); //result value from sensor.
Decimal is point!!
Insert (ForceSensorCalibrationDateTimeStr, "", dbcmdTr);
@@ -719,6 +734,16 @@ class SqlitePreferences : Sqlite
preferences.forceSensorCaptureFeedbackAt =
Convert.ToInt32(reader[1].ToString());
else if(reader[0].ToString() == ForceSensorCaptureFeedbackRange)
preferences.forceSensorCaptureFeedbackRange =
Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ForceSensorFeedbackPathMax)
+ preferences.forceSensorFeedbackPathMax =
Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ForceSensorFeedbackPathMin)
+ preferences.forceSensorFeedbackPathMin =
Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ForceSensorFeedbackPathMasters)
+ preferences.forceSensorFeedbackPathMasters =
Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ForceSensorFeedbackPathMasterSeconds)
+ preferences.forceSensorFeedbackPathMasterSeconds =
Convert.ToInt32(reader[1].ToString());
+ else if(reader[0].ToString() == ForceSensorFeedbackPathLineWidth)
+ preferences.forceSensorFeedbackPathLineWidth =
Convert.ToInt32(reader[1].ToString());
//force sensor tare
else if(reader[0].ToString() == ForceSensorTareDateTimeStr)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]