[chronojump] Improvements on multitest firmware on chronopic window
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Improvements on multitest firmware on chronopic window
- Date: Sat, 13 Sep 2014 10:28:52 +0000 (UTC)
commit 9f8cea3fa7d62587d6014953274dc644b9578407
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Sep 13 12:28:25 2014 +0200
Improvements on multitest firmware on chronopic window
glade/chronojump.glade | 331 +++++++++++++++++++++++++++++++++++++++++-------
src/chronopic.cs | 27 ++---
src/gui/chronopic.cs | 38 +++---
3 files changed, 319 insertions(+), 77 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index 9c39423..aa482dc 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -6218,6 +6218,18 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -6852,6 +6864,18 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -7620,6 +7644,18 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -8147,6 +8183,18 @@ Second Chronopic to platforms.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -15197,13 +15245,13 @@ Evaluator can use real name or nickname.</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkCheckButton" id="checkbutton_multi_show">
+ <widget class="GtkCheckButton" id="check_multichronopic_show">
<property name="label" translatable="yes">Show</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <signal name="clicked" handler="on_checkbutton_multi_show_clicked"
swapped="no"/>
+ <signal name="clicked" handler="on_check_multichronopic_show_clicked"
swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
@@ -15629,13 +15677,13 @@ Evaluator can use real name or nickname.</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkCheckButton" id="check_show_automatic">
+ <widget class="GtkCheckButton" id="check_multitest_show">
<property name="label">Show advanced stuff</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="draw_indicator">True</property>
- <signal name="clicked"
handler="on_checkbutton_show_automatic_clicked" swapped="no"/>
+ <signal name="clicked" handler="on_check_multitest_show_clicked"
swapped="no"/>
</widget>
<packing>
<property name="expand">True</property>
@@ -15646,13 +15694,13 @@ Evaluator can use real name or nickname.</property>
<child>
<widget class="GtkTable" id="table_chronopic_auto">
<property name="can_focus">False</property>
- <property name="n_rows">4</property>
+ <property name="n_rows">3</property>
<property name="n_columns">2</property>
- <property name="column_spacing">4</property>
+ <property name="column_spacing">8</property>
<property name="row_spacing">4</property>
<child>
<widget class="GtkButton" id="button_auto_check_auto">
- <property name="label">Check Automatic Firmware</property>
+ <property name="label">Check Multitest Firmware</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15664,31 +15712,16 @@ Evaluator can use real name or nickname.</property>
</packing>
</child>
<child>
- <widget class="GtkButton" id="button_auto_check_version">
- <property name="label">Check version</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_auto_check_version_clicked" swapped="no"/>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
<widget class="GtkButton" id="button_auto_check_debounce">
- <property name="label">Check debounce</property>
+ <property name="label">Check minimum value</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<signal name="clicked"
handler="on_button_auto_check_debounce_clicked" swapped="no"/>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
@@ -15708,6 +15741,7 @@ Evaluator can use real name or nickname.</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
<property name="adjustment">50 10 90 10 10 0</property>
+ <property name="climb_rate">10</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -15717,7 +15751,7 @@ Evaluator can use real name or nickname.</property>
</child>
<child>
<widget class="GtkButton" id="button_auto_change_debounce">
- <property name="label">Change debounce</property>
+ <property name="label">Change minimum</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -15731,55 +15765,82 @@ Evaluator can use real name or nickname.</property>
</child>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_auto_check_auto">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_auto_check_version">
+ <widget class="GtkLabel" id="label_auto_check">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_auto_check_debounce">
+ <widget class="GtkLabel" id="label_auto_change_debounce">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label_auto_change_debounce">
+ <widget class="GtkHBox" id="hbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label_auto_check_debounce">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_auto_help">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <signal name="clicked" handler="on_button_auto_help_clicked"
swapped="no"/>
+ <child>
+ <widget class="GtkImage" id="image31">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-dialog-info</property>
+ <property name="icon-size">2</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</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">1</property>
+ <property name="bottom_attach">2</property>
</packing>
</child>
</widget>
@@ -17630,6 +17691,18 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -18065,6 +18138,18 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -18949,6 +19034,30 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -26935,6 +27044,78 @@ options</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -28760,6 +28941,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -29254,6 +29447,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -31721,6 +31926,18 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -31820,6 +32037,18 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -31934,6 +32163,18 @@ show elevation as:</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/chronopic.cs b/src/chronopic.cs
index 5908b1a..6fe75af 100644
--- a/src/chronopic.cs
+++ b/src/chronopic.cs
@@ -472,20 +472,15 @@ public class ChronopicAutoCheck : ChronopicAuto
protected internal override string Communicate()
{
sp.Write("J");
- bool isChronopicAuto = ( (char) sp.ReadByte() == 'J');
- return isChronopicAuto.ToString();
- }
-}
-
-public class ChronopicAutoVersion : ChronopicAuto
-{
- protected internal override string Communicate()
- {
- sp.Write("V");
- int major = (char) sp.ReadByte() - '0';
- sp.ReadByte(); //.
- int minor = (char) sp.ReadByte() - '0';
- return major.ToString() + "." + minor.ToString();
+ bool isChronopicAuto = ( (char) sp.ReadByte() == 'J');
+ if (isChronopicAuto) {
+ sp.Write("V");
+ int major = (char) sp.ReadByte() - '0';
+ sp.ReadByte(); //.
+ int minor = (char) sp.ReadByte() - '0';
+ return "Yes! v" + major.ToString() + "." + minor.ToString();
+ }
+ return "Please update it\nwith Chronopic-firmwarecord";
}
}
@@ -495,7 +490,7 @@ public class ChronopicAutoCheckDebounce : ChronopicAuto
{
sp.Write("a");
int debounce = ( sp.ReadByte() - '0' ) * 10;
- return debounce.ToString();
+ return debounce.ToString() + " ms";
}
}
@@ -509,7 +504,7 @@ public class ChronopicAutoChangeDebounce : ChronopicAuto
byte[] bytesToSend = new byte[2] { 0x62, BitConverter.GetBytes(debounce)[0] }; //b, 05
sp.Write(bytesToSend,0,2);
- return "Changed to " + sendNum.ToString();
+ return "Changed to " + sendNum.ToString() + " ms";
}
}
diff --git a/src/gui/chronopic.cs b/src/gui/chronopic.cs
index b99c368..e69f64c 100644
--- a/src/gui/chronopic.cs
+++ b/src/gui/chronopic.cs
@@ -83,7 +83,7 @@ public class ChronopicWindow
[Widget] Gtk.Button button_connect_cp3;
[Widget] Gtk.Button button_connect_cp4;
- [Widget] Gtk.CheckButton checkbutton_multi_show;
+ [Widget] Gtk.CheckButton check_multichronopic_show;
[Widget] Gtk.Table table_multi_chronopic;
//[Widget] Gtk.Button button_reload;
@@ -97,11 +97,10 @@ public class ChronopicWindow
[Widget] Gtk.TextView textview_ports_found_explanation;
//Automatic firmware stuff
- [Widget] Gtk.CheckButton check_show_automatic;
+ [Widget] Gtk.CheckButton check_multitest_show;
[Widget] Gtk.Table table_chronopic_auto;
[Widget] Gtk.SpinButton spin_auto_change_debounce;
- [Widget] Gtk.Label label_auto_check_auto;
- [Widget] Gtk.Label label_auto_check_version;
+ [Widget] Gtk.Label label_auto_check;
[Widget] Gtk.Label label_auto_check_debounce;
[Widget] Gtk.Label label_auto_change_debounce;
@@ -251,8 +250,11 @@ Log.WriteLine("bbb");
label_connect_encoder.UseMarkup = true;
- checkbutton_multi_show.Active = false;
+ check_multichronopic_show.Active = false;
table_multi_chronopic.Visible = false;
+
+ check_multitest_show.Active = false;
+ check_multitest_show.Sensitive = false;
if(isWindows) {
combo_linux1.Hide();
@@ -554,12 +556,14 @@ Log.WriteLine("bbb");
label_title.Text = message;
label_title.UseMarkup = true;
button_cancel.Sensitive = false;
+ check_multitest_show.Sensitive = true;
}
private void sensitivityDisconnected(string message) {
Log.WriteLine("DISCONNECTED!!");
label_title.Text = message;
button_cancel.Sensitive = false;
+ check_multitest_show.Sensitive = false;
}
private void on_button_help_ports_clicked (object o, EventArgs args) {
@@ -640,8 +644,8 @@ Log.WriteLine("bbb");
}
}
- private void on_checkbutton_multi_show_clicked(object o, EventArgs args) {
- table_multi_chronopic.Visible = checkbutton_multi_show.Active;
+ private void on_check_multichronopic_show_clicked(object o, EventArgs args) {
+ table_multi_chronopic.Visible = check_multichronopic_show.Active;
}
private void on_button_connect_cp_clicked (object o, EventArgs args) {
@@ -694,23 +698,17 @@ Log.WriteLine("bbb");
// Chronopic Automatic Firmware ---------------
- private void on_checkbutton_show_automatic_clicked (object o, EventArgs args)
+ private void on_check_multitest_show_clicked (object o, EventArgs args)
{
- table_chronopic_auto.Visible = check_show_automatic.Active;
+ table_chronopic_auto.Visible = check_multitest_show.Active;
}
private void on_button_auto_check_auto_clicked (object o, EventArgs args)
{
ChronopicAuto ca = new ChronopicAutoCheck();
- label_auto_check_auto.Text = ca.Read(sp);
+ label_auto_check.Text = ca.Read(sp);
}
- private void on_button_auto_check_version_clicked (object o, EventArgs args)
- {
- ChronopicAuto ca = new ChronopicAutoVersion();
- label_auto_check_version.Text = ca.Read(sp);
- }
-
private void on_button_auto_check_debounce_clicked (object o, EventArgs args)
{
ChronopicAuto ca = new ChronopicAutoCheckDebounce();
@@ -722,11 +720,19 @@ Log.WriteLine("bbb");
ChronopicAuto ca = new ChronopicAutoChangeDebounce();
label_auto_change_debounce.Text = ca.Write(sp, (int) spin_auto_change_debounce.Value);
}
+
+ private void on_button_auto_help_clicked (object o, EventArgs args)
+ {
+ new DialogMessage(Constants.MessageTypes.INFO,
+ "50 ms recommended for jumps." + "\n" +
+ "10 ms recommended for runs.");
+ }
// end of Chronopic Automatic Firmware ---------------
void prepareChronopicConnection() {
+ check_multitest_show.Sensitive = false;
frame_connection.Visible = true;
label_title.Text = Catalog.GetString("Please touch the platform or click Chronopic
<i>TEST</i> button");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]