[chronojump] RaceAnalyzer capture tab updated at load
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalyzer capture tab updated at load
- Date: Wed, 7 Apr 2021 10:47:16 +0000 (UTC)
commit 558ac4dddaa782d0754aebe7be49e9bfecfb38d9
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Apr 7 12:47:00 2021 +0200
RaceAnalyzer capture tab updated at load
src/gui/app1/runEncoder.cs | 38 +++++++++++++++++++++++++-------------
1 file changed, 25 insertions(+), 13 deletions(-)
---
diff --git a/src/gui/app1/runEncoder.cs b/src/gui/app1/runEncoder.cs
index 323bc4a7..b8f59f66 100644
--- a/src/gui/app1/runEncoder.cs
+++ b/src/gui/app1/runEncoder.cs
@@ -310,8 +310,14 @@ public partial class ChronoJumpWindow
currentRunEncoder = new RunEncoder();
//draw the capture graphs empty:
+ //a) radial
runEncoderShouldShowCaptureGraphsWithData = false;
drawingarea_race_analyzer_capture.QueueDraw(); //will fire ExposeEvent
+ //b) scatterplots
+ cairoGraphRaceAnalyzerPoints_dt_l = new List<PointF>();
+ cairoGraphRaceAnalyzerPoints_st_l = new List<PointF>();
+ drawingarea_race_analyzer_capture_position_time.QueueDraw(); //will fire ExposeEvent
+ drawingarea_race_analyzer_capture_speed_time.QueueDraw(); //will fire ExposeEvent
button_contacts_exercise_close_and_recalculate.Sensitive = false;
textview_contacts_signal_comment.Buffer.Text = "";
@@ -851,19 +857,6 @@ public partial class ChronoJumpWindow
return;
}
- /*
- //TODO: continue to show position and speed graphs on load
- cairoGraphRaceAnalyzerPoints_dt_l = new List<PointF>();
- cairoGraphRaceAnalyzerPoints_st_l = new List<PointF>();
- foreach(string line in contents)
- {
- cairoGraphRaceAnalyzerPoints_dt_l.Add
- cairoGraphRaceAnalyzerPoints_st_l.Add
- }
- updateRaceAnalyzerCapturePositionTime();
- updateRaceAnalyzerCaptureSpeedTime();
- */
-
currentRunEncoder = re;
lastRunEncoderFile = Util.RemoveExtension(re.Filename);
lastRunEncoderFullPath = re.FullURL;
@@ -886,10 +879,15 @@ public partial class ChronoJumpWindow
);
showRaceAnalyzerTriggers ();
+ // ---- capture tab graphs start ---->
+
int count = 0;
reCGSD = new RunEncoderCaptureGetSpeedAndDisplacement();
runEncoderShouldShowCaptureGraphsWithData = true;
+ cairoGraphRaceAnalyzerPoints_dt_l = new List<PointF>();
+ cairoGraphRaceAnalyzerPoints_st_l = new List<PointF>();
+
foreach(string row in contents)
{
LogB.Information("row: " + row);
@@ -901,14 +899,28 @@ public partial class ChronoJumpWindow
if(reCGSD.PassLoadedRow (row))
reCGSD.Calcule();
+
+ //distance/time
+ cairoGraphRaceAnalyzerPoints_dt_l.Add(new PointF(
+ UtilAll.DivideSafe(reCGSD.Time, 1000000),
+ reCGSD.RunEncoderCaptureDistance));
+ //speed/time
+ cairoGraphRaceAnalyzerPoints_st_l.Add(new PointF(
+ UtilAll.DivideSafe(reCGSD.Time, 1000000),
+ reCGSD.RunEncoderCaptureSpeed));
}
if(reCGSD.RunEncoderCaptureSpeedMax > 0)
{
if(cairoRadial == null)
cairoRadial = new CairoRadial(drawingarea_race_analyzer_capture,
preferences.fontType.ToString());
cairoRadial.GraphSpeedMaxAndDistance(reCGSD.RunEncoderCaptureSpeedMax,
reCGSD.RunEncoderCaptureDistance);
+
+ updateRaceAnalyzerCapturePositionTime();
+ updateRaceAnalyzerCaptureSpeedTime();
}
+ // <---- capture tab graphs end ----
+
//on load do the R graph, but not on capture, to show on capture the label related to lack of
person height
//raceEncoderCopyToTempAndDoRGraph();
//no do not do it automatically, just make user click on analyze button
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]