[chronojump] Encoder analyze single instant (added difference)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder analyze single instant (added difference)
- Date: Fri, 5 Feb 2016 12:12:15 +0000 (UTC)
commit 874651269c4846ab9328fd1d91d0c4809678c751
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Feb 5 13:09:55 2016 +0100
Encoder analyze single instant (added difference)
glade/chronojump.glade | 161 +++++++++++++++++++++++++++++++++++++++---------
src/gui/encoder.cs | 18 +++++
2 files changed, 150 insertions(+), 29 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index b27eeb7..54a8151 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -17981,7 +17981,7 @@ on current Chronojump version.</property>
<widget class="GtkTable"
id="table_encoder_analyze_instant">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">5</property>
+ <property name="n_rows">6</property>
<property name="n_columns">7</property>
<property name="column_spacing">8</property>
<property name="row_spacing">4</property>
@@ -18200,13 +18200,14 @@ on current Chronojump version.</property>
<child>
<widget class="GtkLabel"
id="label_encoder_analyze_average">
<property name="can_focus">False</property>
+ <property name="tooltip"
translatable="yes">Average</property>
<property name="label"
translatable="yes">AVG</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18214,13 +18215,14 @@ on current Chronojump version.</property>
<child>
<widget class="GtkLabel"
id="label_encoder_analyze_max">
<property name="can_focus">False</property>
- <property name="label"
translatable="yes">MAX</property>
+ <property name="tooltip"
translatable="yes">Maximum</property>
+ <property name="label"
translatable="yes">Max</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18448,8 +18450,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18463,8 +18465,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18478,8 +18480,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">5</property>
<property name="right_attach">6</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18493,8 +18495,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18508,8 +18510,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18523,8 +18525,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">4</property>
<property name="right_attach">5</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18538,8 +18540,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">5</property>
<property name="right_attach">6</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18553,8 +18555,8 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">6</property>
<property name="right_attach">7</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18565,8 +18567,8 @@ on current Chronojump version.</property>
<property name="can_focus">False</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
<property name="y_options"/>
</packing>
</child>
@@ -18577,8 +18579,8 @@ on current Chronojump version.</property>
<property name="width_chars">8</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
@@ -18641,6 +18643,47 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_displ_max">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width_chars">8</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_needed_to_not_shrink1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_diff">
+ <property name="can_focus">False</property>
+ <property name="tooltip"
translatable="yes">Difference</property>
+ <property name="label"
translatable="yes">Diff</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options"/>
@@ -18648,7 +18691,7 @@ on current Chronojump version.</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_encoder_analyze_displ_max">
+ <widget class="GtkLabel"
id="label_encoder_analyze_displ_diff">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="width_chars">8</property>
@@ -18656,8 +18699,68 @@ on current Chronojump version.</property>
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_speed_diff">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width_chars">8</property>
+ </widget>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_accel_diff">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width_chars">8</property>
+ </widget>
+ <packing>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_force_diff">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width_chars">8</property>
+ </widget>
+ <packing>
+ <property name="left_attach">5</property>
+ <property name="right_attach">6</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel"
id="label_encoder_analyze_power_diff">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="width_chars">8</property>
+ </widget>
+ <packing>
+ <property name="left_attach">6</property>
+ <property name="right_attach">7</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options"/>
<property name="y_options"/>
</packing>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index c080a12..2b7a8bc 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -152,6 +152,11 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_encoder_analyze_accel_b;
[Widget] Gtk.Label label_encoder_analyze_force_b;
[Widget] Gtk.Label label_encoder_analyze_power_b;
+ [Widget] Gtk.Label label_encoder_analyze_displ_diff;
+ [Widget] Gtk.Label label_encoder_analyze_speed_diff;
+ [Widget] Gtk.Label label_encoder_analyze_accel_diff;
+ [Widget] Gtk.Label label_encoder_analyze_force_diff;
+ [Widget] Gtk.Label label_encoder_analyze_power_diff;
[Widget] Gtk.Label label_encoder_analyze_displ_average;
[Widget] Gtk.Label label_encoder_analyze_speed_average;
[Widget] Gtk.Label label_encoder_analyze_accel_average;
@@ -162,6 +167,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_encoder_analyze_accel_max;
[Widget] Gtk.Label label_encoder_analyze_force_max;
[Widget] Gtk.Label label_encoder_analyze_power_max;
+ [Widget] Gtk.Label label_encoder_analyze_diff;
[Widget] Gtk.Label label_encoder_analyze_average;
[Widget] Gtk.Label label_encoder_analyze_max;
@@ -5440,6 +5446,12 @@ public partial class ChronoJumpWindow
int msb = Convert.ToInt32(hscale_encoder_analyze_b.Value);
bool success = eai.CalculateRangeParams(msa, msb);
if(success) {
+ label_encoder_analyze_displ_diff.Text = Util.TrimDecimals(eai.GetParam("displ",msb) -
eai.GetParam("displ",msa), 1);
+ label_encoder_analyze_speed_diff.Text = Util.TrimDecimals(eai.GetParam("speed",msb) -
eai.GetParam("speed",msa), 2);
+ label_encoder_analyze_accel_diff.Text = Util.TrimDecimals(eai.GetParam("accel",msb) -
eai.GetParam("accel",msa), 2);
+ label_encoder_analyze_force_diff.Text = Util.TrimDecimals(eai.GetParam("force",msb) -
eai.GetParam("force",msa), 1);
+ label_encoder_analyze_power_diff.Text = Util.TrimDecimals(eai.GetParam("power",msb) -
eai.GetParam("power",msa), 1);
+
label_encoder_analyze_displ_average.Text = Util.TrimDecimals(eai.displAverageLast, 1);
label_encoder_analyze_speed_average.Text = Util.TrimDecimals(eai.speedAverageLast, 2);
label_encoder_analyze_accel_average.Text = Util.TrimDecimals(eai.accelAverageLast, 2);
@@ -5465,6 +5477,11 @@ public partial class ChronoJumpWindow
label_encoder_analyze_accel_b.Visible = visible;
label_encoder_analyze_force_b.Visible = visible;
label_encoder_analyze_power_b.Visible = visible;
+ label_encoder_analyze_displ_diff.Visible = visible;
+ label_encoder_analyze_speed_diff.Visible = visible;
+ label_encoder_analyze_accel_diff.Visible = visible;
+ label_encoder_analyze_force_diff.Visible = visible;
+ label_encoder_analyze_power_diff.Visible = visible;
label_encoder_analyze_displ_average.Visible = visible;
label_encoder_analyze_speed_average.Visible = visible;
label_encoder_analyze_accel_average.Visible = visible;
@@ -5475,6 +5492,7 @@ public partial class ChronoJumpWindow
label_encoder_analyze_accel_max.Visible = visible;
label_encoder_analyze_force_max.Visible = visible;
label_encoder_analyze_power_max.Visible = visible;
+ label_encoder_analyze_diff.Visible = visible;
label_encoder_analyze_average.Visible = visible;
label_encoder_analyze_max.Visible = visible;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]