[chronojump] DB:1.88 Inserted into preferences: encoderCaptureInertialEccOverloadMode
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] DB:1.88 Inserted into preferences: encoderCaptureInertialEccOverloadMode
- Date: Sat, 22 Feb 2020 17:30:30 +0000 (UTC)
commit e560c097ae6b8511feb6297330db5970ce168d7e
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Feb 22 18:23:44 2020 +0100
DB:1.88 Inserted into preferences: encoderCaptureInertialEccOverloadMode
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 6b712094..833b93f0 100644
--- a/src/preferences.cs
+++ b/src/preferences.cs
@@ -135,6 +135,8 @@ public class Preferences
public Constants.EncoderVariablesCapture encoderCaptureMainVariable;
public Constants.EncoderVariablesCapture encoderCaptureSecondaryVariable;
public bool encoderCaptureSecondaryVariableShow;
+ public enum encoderCaptureEccOverloadModes { NOT_SHOW, SHOW_LINE, SHOW_LINE_AND_PERCENT };
+ public encoderCaptureEccOverloadModes encoderCaptureInertialEccOverloadMode; //maybe on the future
there is one not inertial
public bool encoderCaptureMainVariableThisSetOrHistorical;
public bool encoderCaptureMainVariableGreaterActive;
public int encoderCaptureMainVariableGreaterValue;
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 89e9bfb6..c7792b44 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 = "1.87";
+ static string lastChronojumpDatabaseVersion = "1.88";
public Sqlite() {
}
@@ -2645,6 +2645,15 @@ class Sqlite
currentVersion = updateVersion("1.87");
}
+ if(currentVersion == "1.87")
+ {
+ LogB.SQL("Inserted into preferences: encoderCaptureInertialEccOverloadMode");
+
+ SqlitePreferences.Insert
(SqlitePreferences.EncoderCaptureInertialEccOverloadMode,
+
Preferences.encoderCaptureEccOverloadModes.SHOW_LINE.ToString());
+
+ currentVersion = updateVersion("1.88");
+ }
/*
if(currentVersion == "1.79")
@@ -2859,6 +2868,7 @@ class Sqlite
//changes [from - to - desc]
//just testing: 1.79 - 1.80 Converted DB to 1.80 Created table ForceSensorElasticBandGlue and moved
stiffnessString records there
//
+ //1.87 - 1.88 Converted DB to 1.88 Inserted into preferences:
encoderCaptureInertialEccOverloadMode
//1.86 - 1.87 Converted DB to 1.87 Doing alter table forceSensorExercise adding eccReps,
eccMin, conMin.
//1.85 - 1.86 Converted DB to 1.86 Inserted into preferences: RunEncoderMinAccel
//1.84 - 1.85 Converted DB to 1.85 Inserted 5 vars into preferences:
EncoderCaptureMainVariable...
diff --git a/src/sqlite/preferences.cs b/src/sqlite/preferences.cs
index 8d2eae0b..30249708 100644
--- a/src/sqlite/preferences.cs
+++ b/src/sqlite/preferences.cs
@@ -57,6 +57,7 @@ class SqlitePreferences : Sqlite
public const string EncoderCaptureMainVariableGreaterValue = "encoderCaptureMainVariableGreaterValue";
public const string EncoderCaptureMainVariableLowerActive = "encoderCaptureMainVariableLowerActive";
public const string EncoderCaptureMainVariableLowerValue = "encoderCaptureMainVariableLowerValue";
+ public const string EncoderCaptureInertialEccOverloadMode = "encoderCaptureInertialEccOverloadMode";
//forceSensor
public const string ForceSensorCaptureWidthSeconds = "forceSensorCaptureWidthSeconds";
@@ -159,6 +160,7 @@ class SqlitePreferences : Sqlite
Insert ("encoderCaptureMainVariable",
Constants.EncoderVariablesCapture.MeanPower.ToString(), dbcmdTr);
Insert ("encoderCaptureSecondaryVariable",
Constants.EncoderVariablesCapture.RangeAbsolute.ToString(), dbcmdTr);
Insert ("encoderCaptureSecondaryVariableShow", "True", dbcmdTr);
+ Insert (EncoderCaptureInertialEccOverloadMode,
Preferences.encoderCaptureEccOverloadModes.SHOW_LINE.ToString(), dbcmdTr);
Insert (EncoderCaptureMainVariableThisSetOrHistorical, "True", dbcmdTr);
Insert (EncoderCaptureMainVariableGreaterActive, "False", dbcmdTr);
Insert (EncoderCaptureMainVariableGreaterValue, "90", dbcmdTr);
@@ -387,6 +389,9 @@ class SqlitePreferences : Sqlite
Enum.Parse(typeof(Constants.EncoderVariablesCapture),
reader[1].ToString());
else if(reader[0].ToString() == "encoderCaptureSecondaryVariableShow")
preferences.encoderCaptureSecondaryVariableShow = reader[1].ToString() ==
"True";
+ else if(reader[0].ToString() == EncoderCaptureInertialEccOverloadMode)
+ preferences.encoderCaptureInertialEccOverloadMode =
(Preferences.encoderCaptureEccOverloadModes)
+ Enum.Parse(typeof(Preferences.encoderCaptureEccOverloadModes),
reader[1].ToString());
else if(reader[0].ToString() == EncoderCaptureMainVariableThisSetOrHistorical)
preferences.encoderCaptureMainVariableThisSetOrHistorical =
reader[1].ToString() == "True";
else if(reader[0].ToString() == EncoderCaptureMainVariableGreaterActive)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]