[chronojump/FS-TFT-Menu] RunInterval: Fixed distanceInterval, distancesString since recent commits
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/FS-TFT-Menu] RunInterval: Fixed distanceInterval, distancesString since recent commits
- Date: Wed, 27 Apr 2022 17:18:02 +0000 (UTC)
commit 4bbfcf9fc4f33d9c3f04a8a1dfada4c1c2fae98a
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Apr 21 16:35:51 2022 +0200
RunInterval: Fixed distanceInterval, distancesString since recent commits
src/execute/run.cs | 8 ++++----
src/gui/app1/chronojump.cs | 11 ++++++++---
src/gui/eventExecute.cs | 33 +++++++++++++++++----------------
src/gui/usefulObjects.cs | 14 ++++++--------
4 files changed, 35 insertions(+), 31 deletions(-)
---
diff --git a/src/execute/run.cs b/src/execute/run.cs
index f2c93ad89..d208a3cd8 100644
--- a/src/execute/run.cs
+++ b/src/execute/run.cs
@@ -1158,8 +1158,8 @@ public class RunIntervalExecute : RunExecute
//update graph
PrepareEventGraphRunIntervalRealtimeCaptureObject = new
PrepareEventGraphRunIntervalRealtimeCapture (
- type, distanceIntervalFixed, trackTime, intervalTimesString,
- distanceTotal, distancesString, photocell_l, startIn, success);
+ type, intervalTimesString, distanceInterval, distancesString,
+ photocell_l, startIn, success);
needUpdateGraphType = eventType.RUNINTERVAL;
needUpdateGraph = true;
@@ -1403,8 +1403,8 @@ public class RunIntervalExecute : RunExecute
needShowFeedbackMessage = true;
PrepareEventGraphRunIntervalRealtimeCaptureObject = new
PrepareEventGraphRunIntervalRealtimeCapture (
- type, distanceIntervalFixed, trackTime, intervalTimesString,
- distanceTotal, distancesString, photocell_l, startIn, true);
+ type, intervalTimesString, distanceInterval, distancesString,
+ photocell_l, startIn, success);
needUpdateGraphType = eventType.RUNINTERVAL;
needUpdateGraph = true;
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 93140a141..354d4c299 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1894,13 +1894,18 @@ public partial class ChronoJumpWindow
{
selectedRunInterval = SqliteRunInterval.SelectRunData (Constants.RunIntervalTable,
myTreeViewRunsInterval.EventSelectedID, true, false);
selectedRunIntervalType =
SqliteRunIntervalType.SelectAndReturnRunIntervalType(selectedRunInterval.Type, false);
+
+ /*
+ LogB.Information("selectedRunInterval: " + selectedRunInterval.ToString());
+ LogB.Information("selectedRunIntervalType: " + selectedRunIntervalType.ToString());
+ */
}
blankRunIntervalRealtimeCaptureGraph ();
PrepareRunIntervalRealtimeCaptureGraph (
- selectedRunInterval.DistanceTotal, //TODO: take care, maybe is not this
distance (maybe use selectedRunIntervalType)
- selectedRunInterval.TimeLast, selectedRunInterval.IntervalTimesString,
- selectedRunInterval.DistanceTotal, selectedRunIntervalType.DistancesString,
+ selectedRunInterval.IntervalTimesString,
+ selectedRunInterval.DistanceInterval,
+ selectedRunIntervalType.DistancesString,
selectedRunInterval.Photocell_l,
selectedRunInterval.Type, selectedRunInterval.Description); //Description is
personName
}
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 545250454..379ef546b 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -513,22 +513,23 @@ public partial class ChronoJumpWindow
{
if(currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject !=
null)
PrepareRunIntervalRealtimeCaptureGraph(
-
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distance,
-
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.lastTime,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.timesString,
-
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distanceTotal,
+
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distanceInterval,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distancesString,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.photocell_l,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.type,
currentPerson.Name);
}
else if(selectedRunInterval != null)
+ {
+ LogB.Information("selectedRunInterval: " + selectedRunInterval.ToString());
PrepareRunIntervalRealtimeCaptureGraph(
- selectedRunInterval.DistanceTotal, //TODO: take care, maybe
is not this distance (maybe use selectedRunIntervalType)
- selectedRunInterval.TimeLast,
selectedRunInterval.IntervalTimesString,
- selectedRunInterval.DistanceTotal,
selectedRunIntervalType.DistancesString,
+ selectedRunInterval.IntervalTimesString,
+ selectedRunInterval.DistanceInterval,
+ selectedRunIntervalType.DistancesString,
selectedRunInterval.Photocell_l,
selectedRunInterval.Type, selectedRunInterval.Description);
//Description is person.Name
+ }
}
}
@@ -800,8 +801,9 @@ public partial class ChronoJumpWindow
event_execute_drawingarea_realtime_capture_cairo,
preferences.fontType.ToString());
}
- public void PrepareRunIntervalRealtimeCaptureGraph (double lastDistance, double lastTime, string
timesString, double distanceTotal,
- string distancesString, List<int> photocell_l, string type, string personName)
+ public void PrepareRunIntervalRealtimeCaptureGraph (string timesString,
+ double distanceInterval, string distancesString,
+ List<int> photocell_l, string type, string personName)
{
if(currentPerson == null)
return;
@@ -816,9 +818,9 @@ public partial class ChronoJumpWindow
cairoPaintBarsPreRealTime = new CairoPaintBarsPreRunIntervalRealtimeCapture(
event_execute_drawingarea_realtime_capture_cairo,
preferences.fontType.ToString(), current_mode,
personName, type, preferences.digitsNumber,// preferences.heightPreferred,
- check_runI_realtime_rel_abs.Active, lastDistance,
- //lastTime,
- timesString, distancesString, photocell_l, isLastCaptured);
+ check_runI_realtime_rel_abs.Active,
+ timesString, distanceInterval, distancesString,
+ photocell_l, isLastCaptured);
// B) Paint cairo graph
//cairoPaintBarsPreRealTime.UseHeights = useHeights;
@@ -1882,10 +1884,8 @@ public partial class ChronoJumpWindow
*/
PrepareRunIntervalRealtimeCaptureGraph(
-
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distance,
-
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.lastTime,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.timesString,
-
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distanceTotal,
+
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distanceInterval,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.distancesString,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.photocell_l,
currentEventExecute.PrepareEventGraphRunIntervalRealtimeCaptureObject.type,
@@ -3165,8 +3165,9 @@ public class CairoPaintBarsPreRunIntervalRealtimeCapture : CairoPaintBarsPre
public CairoPaintBarsPreRunIntervalRealtimeCapture (DrawingArea darea, string fontStr,
Constants.Modes mode, string personName, string testName, int pDN,// bool
heightPreferred,
bool isRelative,
- double lastDistance,
- string timesString, string distancesString,
+ string timesString,
+ double distanceInterval, //know each track distance according to this or
distancesString
+ string distancesString,
List<int> photocell_l, bool isLastCaptured)
{
initialize (darea, fontStr, mode, personName, testName, pDN);
diff --git a/src/gui/usefulObjects.cs b/src/gui/usefulObjects.cs
index 2ddaa0103..0af332145 100644
--- a/src/gui/usefulObjects.cs
+++ b/src/gui/usefulObjects.cs
@@ -358,10 +358,8 @@ public class PrepareEventGraphRunInterval
public class PrepareEventGraphRunIntervalRealtimeCapture
{
public string type;
- public double distance;
- public double lastTime;
public string timesString;
- public double distanceTotal; //we pass this because it's dificult to calculate in runs with variable
distances
+ public double distanceInterval; //we pass this because it's dificult to calculate in runs with
variable distances
public string distancesString; //we pass this because it's dificult to calculate in runs with
variable distances
public List<int> photocell_l; //for Wichro
public bool startIn;
@@ -370,15 +368,15 @@ public class PrepareEventGraphRunIntervalRealtimeCapture
public PrepareEventGraphRunIntervalRealtimeCapture() {
}
- public PrepareEventGraphRunIntervalRealtimeCapture (string type, double distance, double lastTime,
string timesString,
- double distanceTotal, string distancesString, List<int> photocell_l,
+ public PrepareEventGraphRunIntervalRealtimeCapture (string type,
+ string timesString,
+ double distanceInterval, string distancesString,
+ List<int> photocell_l,
bool startIn, bool finished)
{
this.type = type;
- this.distance = distance;
- this.lastTime = lastTime;
this.timesString = timesString;
- this.distanceTotal = distanceTotal;
+ this.distanceInterval = distanceInterval;
this.distancesString = distancesString;
this.photocell_l = photocell_l;
this.startIn = startIn;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]