[chronojump] RunEncoder capture simulated activable from prefs debug mode
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] RunEncoder capture simulated activable from prefs debug mode
- Date: Wed, 18 Sep 2019 15:09:04 +0000 (UTC)
commit 73f35bac51c1b6990ddf2826618e6bef841eadb0
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Sep 18 16:09:12 2019 +0200
RunEncoder capture simulated activable from prefs debug mode
glade/app1.glade | 37 +++++++++++++++++++++++++------------
src/gui/chronojump.cs | 2 ++
src/gui/runEncoder.cs | 10 +++++++++-
3 files changed, 36 insertions(+), 13 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 90d80764..dae15ea5 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -566,6 +566,13 @@
</child>
</widget>
</child>
+ <child>
+ <widget class="GtkCheckMenuItem" id="menuitem_check_race_encoder_capture_simulate">
+ <property name="can_focus">False</property>
+ <property name="label">Simulated capture</property>
+ <property name="use_underline">True</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
@@ -21999,6 +22006,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -23959,6 +23969,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>
@@ -23995,18 +24017,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>
@@ -30890,6 +30900,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 4a08918c..77367e0c 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -6856,6 +6856,8 @@ LogB.Debug("mc finished 5");
button_carles.Visible = true;
menuitem_ping.Visible = true;
+ menuitem_check_race_encoder_capture_simulate.Visible = true;
+
preferencesWin.DebugActivated();
}
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index 4101427f..e10a4c4c 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -34,6 +34,7 @@ using Mono.Unix;
public partial class ChronoJumpWindow
{
[Widget] Gtk.MenuItem menuitem_race_encoder_open_folder;
+ [Widget] Gtk.CheckMenuItem menuitem_check_race_encoder_capture_simulate;
[Widget] Gtk.HBox hbox_combo_run_encoder_exercise;
[Widget] Gtk.ComboBox combo_run_encoder_exercise;
@@ -65,6 +66,7 @@ public partial class ChronoJumpWindow
private RunEncoder currentRunEncoder;
private RunEncoderExercise currentRunEncoderExercise;
DateTime runEncoderTimeStartCapture;
+ bool runEncoderCaptureSimulated;
static string lastRunEncoderFile = "";
static string lastRunEncoderFullPath = "";
@@ -304,6 +306,8 @@ public partial class ChronoJumpWindow
usbDisconnectedCount = 0;
usbDisconnectedLastTime = 0;
+ runEncoderCaptureSimulated = menuitem_check_race_encoder_capture_simulate.Active;
+
/*
//initialize
forceSensorValues = new ForceSensorValues();
@@ -331,7 +335,11 @@ public partial class ChronoJumpWindow
LogB.Information("runEncoderCaptureDo 0");
lastChangedTime = 0;
- if(! runEncoderSendCommand("start_capture:", "", "Catched run encoder capturing"))
+ string command = "start_capture:";
+ if(runEncoderCaptureSimulated)
+ command = "start_simulation:";
+
+ if(! runEncoderSendCommand(command, "", "Catched run encoder capturing"))
{
runEncoderProcessError = true;
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]