Commit 8f3b886b authored by Xavier de Blas's avatar Xavier de Blas

raceAnalyzer: get distance and temperature from gui

parent c97076e1
...@@ -1833,6 +1833,9 @@ ...@@ -1833,6 +1833,9 @@
<placeholder/> <placeholder/>
</child> </child>
<child> <child>
<placeholder/>
</child>
<child>
<widget class="GtkLabel" id="label_start_selector_jumps"> <widget class="GtkLabel" id="label_start_selector_jumps">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -5773,7 +5776,7 @@ EncoderInertialCapture</property> ...@@ -5773,7 +5776,7 @@ EncoderInertialCapture</property>
<widget class="GtkLabel" id="label368"> <widget class="GtkLabel" id="label368">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label">race encoder stuff EXPERIMENTAL</property> <property name="label">race analyzer stuff EXPERIMENTAL</property>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -8593,11 +8596,57 @@ EncoderInertialCapture</property> ...@@ -8593,11 +8596,57 @@ EncoderInertialCapture</property>
<widget class="GtkHBox" id="hbox288"> <widget class="GtkHBox" id="hbox288">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</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> <child>
<widget class="GtkLabel" id="label370"> <widget class="GtkLabel" id="race_analyzer_distance_units">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</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> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -8605,6 +8654,63 @@ EncoderInertialCapture</property> ...@@ -8605,6 +8654,63 @@ EncoderInertialCapture</property>
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </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> </widget>
<packing> <packing>
<property name="position">8</property> <property name="position">8</property>
...@@ -13187,7 +13293,7 @@ EncoderInertialCapture</property> ...@@ -13187,7 +13293,7 @@ EncoderInertialCapture</property>
<widget class="GtkLabel" id="label372"> <widget class="GtkLabel" id="label372">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label">race encoder stuff EXPERIMENTAL</property> <property name="label">race analyzer stuff EXPERIMENTAL</property>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -19375,12 +19481,6 @@ Concentric</property> ...@@ -19375,12 +19481,6 @@ Concentric</property>
<placeholder/> <placeholder/>
</child> </child>
<child> <child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkCheckButton" id="checkbutton_force_sensor_ai_b"> <widget class="GtkCheckButton" id="checkbutton_force_sensor_ai_b">
<property name="width_request">30</property> <property name="width_request">30</property>
<property name="visible">True</property> <property name="visible">True</property>
...@@ -19508,6 +19608,9 @@ Concentric</property> ...@@ -19508,6 +19608,9 @@ Concentric</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -27824,6 +27927,9 @@ then click this button.</property> ...@@ -27824,6 +27927,9 @@ then click this button.</property>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
<child>
<placeholder/>
</child>
</widget> </widget>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
...@@ -1452,8 +1452,6 @@ LogB.Information(" re R "); ...@@ -1452,8 +1452,6 @@ LogB.Information(" re R ");
private void showHideForceSensorControls(bool modeForceSensor) private void showHideForceSensorControls(bool modeForceSensor)
{ {
hbox_capture_phases_time_record.Visible = ! modeForceSensor; hbox_capture_phases_time_record.Visible = ! modeForceSensor;
button_image_test_zoom.Visible = ! modeForceSensor;
menuitem_force_sensor_open_folder.Visible = modeForceSensor; menuitem_force_sensor_open_folder.Visible = modeForceSensor;
menuitem_force_sensor_check_version.Visible = modeForceSensor; menuitem_force_sensor_check_version.Visible = modeForceSensor;
} }
......
...@@ -32,6 +32,12 @@ using Mono.Unix; ...@@ -32,6 +32,12 @@ using Mono.Unix;
public partial class ChronoJumpWindow 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; Thread runEncoderCaptureThread;
static bool runEncoderProcessFinish; static bool runEncoderProcessFinish;
static bool runEncoderProcessCancel; static bool runEncoderProcessCancel;
...@@ -181,6 +187,9 @@ public partial class ChronoJumpWindow ...@@ -181,6 +187,9 @@ public partial class ChronoJumpWindow
return; return;
} }
race_analyzer_distance = Convert.ToInt32(race_analyzer_spinbutton_distance.Value);
race_analyzer_temperature = Convert.ToInt32(race_analyzer_spinbutton_temperature.Value);
runEncoderButtonsSensitive(false); runEncoderButtonsSensitive(false);
bool connected = runEncoderCapturePre(); bool connected = runEncoderCapturePre();
if(! connected) if(! connected)
...@@ -377,12 +386,14 @@ public partial class ChronoJumpWindow ...@@ -377,12 +386,14 @@ public partial class ChronoJumpWindow
File.Copy(fileName, UtilEncoder.GetRaceAnalyzerCSVFileName(), true); //can be overwritten File.Copy(fileName, UtilEncoder.GetRaceAnalyzerCSVFileName(), true); //can be overwritten
lastRunEncoderFullPath = fileName; lastRunEncoderFullPath = fileName;
race_analyzer_distance = Convert.ToInt32(race_analyzer_spinbutton_distance.Value);
race_analyzer_temperature = Convert.ToInt32(race_analyzer_spinbutton_temperature.Value);
//create graph //create graph
RunEncoderGraph reg = new RunEncoderGraph( RunEncoderGraph reg = new RunEncoderGraph(
30, //TODO: 30 hardcoded race_analyzer_distance,
currentPersonSession.Weight, //TODO: can be more if extra weight currentPersonSession.Weight, //TODO: can be more if extra weight
currentPersonSession.Height, currentPersonSession.Height,
25); //TODO: hardcoded race_analyzer_temperature);
reg.CallR(1699, 768); //TODO: hardcoded reg.CallR(1699, 768); //TODO: hardcoded
DateTime runEncoderGraphStarted = DateTime.Now; DateTime runEncoderGraphStarted = DateTime.Now;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment