[chronojump] raceAnalyzer: get distance and temperature from gui
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] raceAnalyzer: get distance and temperature from gui
- Date: Thu, 14 Feb 2019 15:45:46 +0000 (UTC)
commit 8f3b886b71f4ebd45e687a6734c41b20e83df998
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Feb 14 16:44:18 2019 +0100
raceAnalyzer: get distance and temperature from gui
glade/app1.glade | 126 +++++++++++++++++++++++++++++++++++++++++++++----
src/gui/forceSensor.cs | 2 -
src/gui/runEncoder.cs | 15 +++++-
3 files changed, 129 insertions(+), 14 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 1ef49f70..610ee4d4 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1833,6 +1833,9 @@
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkLabel"
id="label_start_selector_jumps">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -5773,7 +5776,7 @@ EncoderInertialCapture</property>
<widget class="GtkLabel" id="label368">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">race encoder stuff
EXPERIMENTAL</property>
+ <property name="label">race analyzer stuff
EXPERIMENTAL</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -8593,11 +8596,57 @@ EncoderInertialCapture</property>
<widget class="GtkHBox" id="hbox288">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">30</property>
+ <child>
+ <widget class="GtkHBox"
id="hbox_race_analyzer_distance">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label70">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Distance</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="race_analyzer_spinbutton_distance">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property
name="invisible_char_set">True</property>
+ <property
name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property
name="primary_icon_sensitive">True</property>
+ <property
name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">30 1 300 1 10
0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
- <widget class="GtkLabel" id="label370">
+ <widget class="GtkLabel"
id="race_analyzer_distance_units">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">race encoder stuff
EXPERIMENTAL</property>
+ <property name="xalign">0</property>
+ <property name="label">m</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -8605,6 +8654,63 @@ EncoderInertialCapture</property>
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox"
id="hbox_race_analyzer_temperature">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label138">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Temperature</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="race_analyzer_spinbutton_temperature">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property
name="invisible_char_set">True</property>
+ <property
name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property
name="primary_icon_sensitive">True</property>
+ <property
name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">25 -50 50 1 10
0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="race_analyzer_temperature_units">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">ºC</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">8</property>
@@ -13187,7 +13293,7 @@ EncoderInertialCapture</property>
<widget class="GtkLabel" id="label372">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">race encoder stuff
EXPERIMENTAL</property>
+ <property name="label">race analyzer stuff
EXPERIMENTAL</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -19375,12 +19481,6 @@ Concentric</property>
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkCheckButton"
id="checkbutton_force_sensor_ai_b">
<property name="width_request">30</property>
<property name="visible">True</property>
@@ -19508,6 +19608,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -27824,6 +27927,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 71e1c17c..6ad68c52 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -1452,8 +1452,6 @@ LogB.Information(" re R ");
private void showHideForceSensorControls(bool modeForceSensor)
{
hbox_capture_phases_time_record.Visible = ! modeForceSensor;
- button_image_test_zoom.Visible = ! modeForceSensor;
-
menuitem_force_sensor_open_folder.Visible = modeForceSensor;
menuitem_force_sensor_check_version.Visible = modeForceSensor;
}
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index 53fcbb00..5b885160 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -32,6 +32,12 @@ using Mono.Unix;
public partial class ChronoJumpWindow
{
+ [Widget] Gtk.SpinButton race_analyzer_spinbutton_distance;
+ [Widget] Gtk.SpinButton race_analyzer_spinbutton_temperature;
+
+ int race_analyzer_distance;
+ int race_analyzer_temperature;
+
Thread runEncoderCaptureThread;
static bool runEncoderProcessFinish;
static bool runEncoderProcessCancel;
@@ -181,6 +187,9 @@ public partial class ChronoJumpWindow
return;
}
+ race_analyzer_distance = Convert.ToInt32(race_analyzer_spinbutton_distance.Value);
+ race_analyzer_temperature = Convert.ToInt32(race_analyzer_spinbutton_temperature.Value);
+
runEncoderButtonsSensitive(false);
bool connected = runEncoderCapturePre();
if(! connected)
@@ -377,12 +386,14 @@ public partial class ChronoJumpWindow
File.Copy(fileName, UtilEncoder.GetRaceAnalyzerCSVFileName(), true); //can be
overwritten
lastRunEncoderFullPath = fileName;
+ race_analyzer_distance = Convert.ToInt32(race_analyzer_spinbutton_distance.Value);
+ race_analyzer_temperature = Convert.ToInt32(race_analyzer_spinbutton_temperature.Value);
//create graph
RunEncoderGraph reg = new RunEncoderGraph(
- 30, //TODO: 30 hardcoded
+ race_analyzer_distance,
currentPersonSession.Weight, //TODO: can be more if extra weight
currentPersonSession.Height,
- 25); //TODO: hardcoded
+ race_analyzer_temperature);
reg.CallR(1699, 768); //TODO: hardcoded
DateTime runEncoderGraphStarted = DateTime.Now;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]