[chronojump] Convert from 1_68 shows rate/subrate pulsebars and progressing text
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Convert from 1_68 shows rate/subrate pulsebars and progressing text
- Date: Mon, 11 Nov 2019 12:01:43 +0000 (UTC)
commit 225e7bf5c963b7bad80aec7e6940226e0c1ee7ed
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Nov 11 13:01:16 2019 +0100
Convert from 1_68 shows rate/subrate pulsebars and progressing text
src/sqlite/forceSensor.cs | 6 ++++++
src/sqlite/main.cs | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/sqlite/forceSensor.cs b/src/sqlite/forceSensor.cs
index a1394ace..29700a20 100644
--- a/src/sqlite/forceSensor.cs
+++ b/src/sqlite/forceSensor.cs
@@ -285,6 +285,8 @@ class SqliteForceSensor : Sqlite
int unknownExerciseID = Sqlite.ExistsAndGetUniqueID(true, Constants.ForceSensorExerciseTable,
Catalog.GetString("Unknown"));
DirectoryInfo [] sessions = new DirectoryInfo(forceSensorDir).GetDirectories();
+ conversionRateTotal = sessions.Length;
+ conversionRate = 1;
foreach (DirectoryInfo session in sessions) //session.Name will be the UniqueID
{
//if there is a session where the user manually changed the folder name (has to be a
sessionID)
@@ -298,6 +300,8 @@ class SqliteForceSensor : Sqlite
personSessionExistsInSession =
SqlitePersonSession.PersonSelectExistsInSession(true, unknownPersonID, Convert.ToInt32(session.Name));
FileInfo[] files = session.GetFiles();
+ conversionSubRateTotal = files.Length;
+ conversionSubRate = 1;
foreach (FileInfo file in files)
{
string fileWithoutExtension =
Util.RemoveExtension(Util.GetLastPartOfPath(file.Name));
@@ -407,7 +411,9 @@ class SqliteForceSensor : Sqlite
"", -1, "", //videoURL, stiffness, stiffnessString
exerciseName);
forceSensor.InsertSQL(true);
+ conversionSubRate ++;
}
+ conversionRate ++;
}
//LogB.PrintAllThreads = false; //TODO: remove this
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 036eb846..2a069d31 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -112,8 +112,8 @@ class Sqlite
//for db conversion
static string currentVersion = "0";
- static int conversionRate;
- static int conversionRateTotal;
+ protected static int conversionRate;
+ protected static int conversionRateTotal;
protected static int conversionSubRate;
protected static int conversionSubRateTotal;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]