[chronojump] Curve meanPower on select curves as '.' in SQL, and c phase stored on ec
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Curve meanPower on select curves as '.' in SQL, and c phase stored on ec
- Date: Fri, 23 May 2014 09:44:14 +0000 (UTC)
commit 3d49c445d2ffc624c10a914e5f898be992f32ab1
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri May 23 11:43:27 2014 +0200
Curve meanPower on select curves as '.' in SQL, and c phase stored on ec
src/gui/encoder.cs | 10 +++++++---
src/sqlite/encoder.cs | 6 +++---
2 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 5f4be94..af4a513 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1641,16 +1641,18 @@ public partial class ChronoJumpWindow
return "";
}
- EncoderCurve curve = new EncoderCurve();
+ string meanPowerStr = "";
string desc = "";
if(mode == "curve") {
- curve = treeviewEncoderCaptureCurvesGetCurve(selectedID,true);
+ EncoderCurve curve = treeviewEncoderCaptureCurvesGetCurve(selectedID,true);
//some start at ,5 because of the spline filtering
int curveStart = Convert.ToInt32(decimal.Truncate(Convert.ToDecimal(curve.Start)));
int duration = Convert.ToInt32(decimal.Truncate(Convert.ToDecimal(curve.Duration)));
+ meanPowerStr = curve.MeanPower;
+
if(ecconLast != "c") {
EncoderCurve curveNext =
treeviewEncoderCaptureCurvesGetCurve(selectedID+1,false);
@@ -1665,6 +1667,8 @@ public partial class ChronoJumpWindow
//duration is duration of ecc + duration of iso + duration of concentric
duration += (isometricDuration + curveConDuration);
+
+ meanPowerStr = curveNext.MeanPower; //take power of concentric phase
}
/*
@@ -1728,7 +1732,7 @@ public partial class ChronoJumpWindow
eSQL.description = desc;
if(mode == "curve") {
eSQL.status = "active";
- eSQL.future1 = curve.MeanPower;
+ eSQL.future1 = meanPowerStr;
}
eSQL.encoderConfiguration = encoderConfigurationCurrent;
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 41324f0..4ad9465 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -87,7 +87,7 @@ class SqliteEncoder : Sqlite
es.url + "', " + es.time + ", " + es.minHeight + ", '" + es.description +
"', '" + es.status + "', '" + es.videoURL + "', '" +
es.encoderConfiguration.ToString(":",true) + "', '" +
- es.future1 + "', '" + es.future2 + "', '" + es.future3 + "')";
+ Util.ConvertToPoint(es.future1) + "', '" + es.future2 + "', '" + es.future3 + "')";
Log.WriteLine(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
@@ -127,7 +127,7 @@ class SqliteEncoder : Sqlite
"', status = '" + es.status +
"', videoURL = '" + es.videoURL +
"', encoderConfiguration = '" + es.encoderConfiguration.ToString(":",true) +
- "', future1 = '" + es.future1 +
+ "', future1 = '" + Util.ConvertToPoint(es.future1) +
"', future2 = '" + es.future2 +
"', future3 = '" + es.future3 +
"' WHERE uniqueID == " + es.uniqueID ;
@@ -231,7 +231,7 @@ class SqliteEncoder : Sqlite
reader[13].ToString(), //status
reader[14].ToString(), //videoURL
econf, //encoderConfiguration
- reader[16].ToString(), //future1
+ Util.ChangeDecimalSeparator(reader[16].ToString()), //future1
(meanPower on curves)
reader[17].ToString(), //future2
reader[18].ToString(), //future3
reader[19].ToString() //EncoderExercise.name
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]