[chronojump] Fix to exhibition mean power upload
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fix to exhibition mean power upload
- Date: Fri, 1 Mar 2019 13:53:12 +0000 (UTC)
commit e2370c1114f8859c36d078fb954360572af1379f
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 1 14:52:35 2019 +0100
Fix to exhibition mean power upload
src/gui/encoder.cs | 2 +-
src/json.cs | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index bec0178c..b85e431e 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -6983,7 +6983,7 @@ public partial class ChronoJumpWindow
{
UploadEncoderDataObject uo = new
UploadEncoderDataObject(
encoderCaptureCurves,
lastEncoderSQLSignal.eccon);
-
SqliteJson.UploadExhibitionTest(getExhibitionTestFromGui(ExhibitionTest.testTypes.INERTIAL,
Convert.ToDouble(uo.pmeanByPower)));
+
SqliteJson.UploadExhibitionTest(getExhibitionTestFromGui(ExhibitionTest.testTypes.INERTIAL,
Convert.ToDouble(uo.pmeanByPowerAsDouble)));
}
}
diff --git a/src/json.cs b/src/json.cs
index 12b88b60..03ef97f9 100644
--- a/src/json.cs
+++ b/src/json.cs
@@ -1149,6 +1149,8 @@ public class UploadEncoderDataObject
public string pmeanByPower;
public string pmaxByPower;
+ public double pmeanByPowerAsDouble;
+
//constructor called after capture
public UploadEncoderDataObject(ArrayList curves, string eccon)
{
@@ -1181,6 +1183,8 @@ public class UploadEncoderDataObject
pmaxBySpeed = Util.ConvertToPoint(curveBySpeed.PeakPower);
pmaxByPower = Util.ConvertToPoint(curveByPower.PeakPower);
+ pmeanByPowerAsDouble = Convert.ToDouble(curveByPower.MeanPower);
+
//add +1 to show to user
numBySpeed = nSpeed + 1;
numByPower = nPower + 1;
@@ -1211,6 +1215,8 @@ public class UploadEncoderDataObject
pmaxBySpeed = Util.ConvertToPoint( eSignal.GetEccConMax(nSpeed, Constants.PeakPower) );
pmaxByPower = Util.ConvertToPoint( eSignal.GetEccConMax(nPower, Constants.PeakPower) );
+ pmeanByPowerAsDouble = Convert.ToDouble( eSignal.GetEccConMean(nPower, Constants.MeanPower) );
+
//add +1 to show to user
numBySpeed = (nSpeed /2) + 1;
numByPower = (nPower /2) + 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]