[chronojump/FS-TFT-Menu] Encoder overview window implements repCriteria
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/FS-TFT-Menu] Encoder overview window implements repCriteria
- Date: Wed, 20 Apr 2022 11:59:23 +0000 (UTC)
commit d08a1766dd9a65256e149631b70b50d661f6aae8
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Apr 8 12:30:58 2022 +0200
Encoder overview window implements repCriteria
src/gui/overview.cs | 9 +++++----
src/sqlite/encoder.cs | 21 ++++++++++++++++-----
2 files changed, 21 insertions(+), 9 deletions(-)
---
diff --git a/src/gui/overview.cs b/src/gui/overview.cs
index 3beefc413..5c5fc21ca 100644
--- a/src/gui/overview.cs
+++ b/src/gui/overview.cs
@@ -294,6 +294,7 @@ public class EncoderOverviewWindow : OverviewWindow
tv.AppendColumn (Catalog.GetString ("Power"), new CellRendererText(), "text",
count++);
tv.AppendColumn (Catalog.GetString ("Speed"), new CellRendererText(), "text",
count++);
tv.AppendColumn (Catalog.GetString ("Force"), new CellRendererText(), "text",
count++);
+ tv.AppendColumn (Catalog.GetString ("Save criteria on eccentric-concentric"), new
CellRendererText(), "text", count++);
}
}
@@ -310,11 +311,11 @@ public class EncoderOverviewWindow : OverviewWindow
//personID (hidden), person name, sex, encoderConfiguration, exercise, sets
} else {
if(encoderGI == Constants.EncoderGI.GRAVITATORY)
- s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof
(string));
- //personID (hidden), person name, sex, encoderConfiguration, exercise, extra
mass, contraction, power, speed, force
+ s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string));
+ //personID (hidden), person name, sex, encoderConfiguration, exercise, extra
mass, contraction, power, speed, force, repCriteria
else
- s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string));
- //personID (hidden), person name, sex, encoderConfiguration, exercise,
contraction, power, speed, force
+ s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof (string), typeof (string), typeof (string), typeof (string), typeof
(string));
+ //personID (hidden), person name, sex, encoderConfiguration, exercise,
contraction, power, speed, force, repCriteria
}
return s;
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 41f4aed83..8c7936ef1 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -582,7 +582,7 @@ class SqliteEncoder : Sqlite
dbcmd.CommandText =
"SELECT person77.uniqueID, person77.name, person77.sex, encoder.encoderConfiguration,
encoderExercise.name, " +
- "encoder.extraWeight, encoder.eccon, encoder.future1, encoder.future2,
encoder.future3 " +
+ "encoder.extraWeight, encoder.eccon, encoder.future1, encoder.future2,
encoder.future3, encoder.repCriteria " +
"FROM person77, encoderExercise, encoder " +
"WHERE sessionID = " + sessionID.ToString() +
" AND signalOrCurve = \"curve\" " +
@@ -610,6 +610,17 @@ class SqliteEncoder : Sqlite
else if(encoderGI == Constants.EncoderGI.INERTIAL && ! econf.has_inertia)
continue;
+ string repCriteria = "";
+ if(reader[6].ToString() != "c")
+ {
+ if(reader[10].ToString() ==
Preferences.EncoderRepetitionCriteria.ECC_CON.ToString())
+ repCriteria = Catalog.GetString("Eccentric-concentric");
+ else if(reader[10].ToString() ==
Preferences.EncoderRepetitionCriteria.ECC.ToString())
+ repCriteria = Catalog.GetString("Eccentric");
+ else if(reader[10].ToString() ==
Preferences.EncoderRepetitionCriteria.CON.ToString())
+ repCriteria = Catalog.GetString("Concentric");
+ }
+
if(encoderGI == Constants.EncoderGI.GRAVITATORY)
{
string [] s = {
@@ -622,8 +633,8 @@ class SqliteEncoder : Sqlite
EncoderSQL.EcconLong(reader[6].ToString()),
reader[7].ToString(), //power
reader[8].ToString(), //speed
- reader[9].ToString() //force
- //TODO repCriteria
+ reader[9].ToString(), //force
+ repCriteria
};
array.Add (s);
} else {
@@ -636,8 +647,8 @@ class SqliteEncoder : Sqlite
EncoderSQL.EcconLong(reader[6].ToString()),
reader[7].ToString(), //power
reader[8].ToString(), //speed
- reader[9].ToString() //force
- //TODO repCriteria
+ reader[9].ToString(), //force
+ repCriteria
};
array.Add (s);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]