[chronojump] RaceAnalyzer: Code for realtime speed show. UNTESTED!
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RaceAnalyzer: Code for realtime speed show. UNTESTED!
- Date: Mon, 14 Dec 2020 12:00:44 +0000 (UTC)
commit a6d0c6888dbd30773cb71a17c99f890521301cb3
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Dec 14 13:00:22 2020 +0100
RaceAnalyzer: Code for realtime speed show. UNTESTED!
glade/app1.glade | 55 ++++++++++++++++++++++++++++----------
r-scripts/sprintEncoder.R | 2 +-
src/gui/app1/forceSensorAnalyze.cs | 15 +++++++++++
3 files changed, 57 insertions(+), 15 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 2b748a1b..c8229eea 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -11550,7 +11550,7 @@ EncoderInertialCapture</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox132">
+ <widget class="GtkVBox"
id="vbox132_race_analyzer">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">8</property>
@@ -11558,8 +11558,29 @@ EncoderInertialCapture</property>
<widget class="GtkHBox" id="hbox290">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">8</property>
<child>
- <placeholder/>
+ <widget class="GtkLabel" id="label584">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">race analyzer capture
speed:</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_race_analyzer_capture_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
<packing>
@@ -23464,6 +23485,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -28285,6 +28309,18 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
+ <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tests
will be filmed</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkHBox"
id="hbox_video_encoder_capturing">
<property name="can_focus">False</property>
<property name="spacing">4</property>
@@ -28321,18 +28357,6 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_video_encoder_tests_will_be_filmed">
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Tests
will be filmed</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
<widget class="GtkHBox"
id="hbox_video_encoder_no_capturing">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -36549,6 +36573,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/r-scripts/sprintEncoder.R b/r-scripts/sprintEncoder.R
index c5803ab4..31bdd366 100644
--- a/r-scripts/sprintEncoder.R
+++ b/r-scripts/sprintEncoder.R
@@ -94,7 +94,7 @@ getSprintFromEncoder <- function(filename, testLength, Mass, Temperature = 25, H
#TODO: measure metersPerPulse several times to have an accurate value
metersPerPulse = NULL
if(device == "MANUAL") #manual race analyzer - Hand device
- metersPerPulse = 0.003003
+ metersPerPulse = 0.003003 #HARDCODED, same as: src/gui/app1/runEncoder.cs
else #resisted race analyzer - sled device
metersPerPulse = 4 * 30 / 12267 #With an encoder of 200 ppr, in 30m there are 12267
pulses.
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index e60c6b69..6bdd1bff 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -1427,6 +1427,21 @@ public partial class ChronoJumpWindow
plotRFDLineDebugConstruction(countRFDMax);
}
}
+
+ /*
+ // triggers
+ double lowerMs = fsAI.GetTimeMS(hscaleLower);
+ double higherMs = fsAI.GetTimeMS(hscaleHigher);
+ foreach(Trigger trigger in triggerListForceSensor)
+ {
+ if(trigger.Ms > lowerMs && trigger.Ms < HigherMs)
+ //write the vertical start line
+ force_sensor_ai_pixmap.DrawLine(pen_green_force_ai,
+ ???, textHeight +6, ???, allocation.Height - textHeight -6);
+ //TODO: do green for on, red for off
+ }
+ */
+
LogB.Information("forceSensorAnalyzeManualGraphDo() END");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]