[chronojump] '+', '-' changes encoder weights on gravitatory and inertial (also manages textview)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] '+', '-' changes encoder weights on gravitatory and inertial (also manages textview)
- Date: Thu, 17 Aug 2017 18:58:35 +0000 (UTC)
commit d97342d060d2edb8d0cad77e1797f1c9edc98fe4
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Aug 17 20:57:15 2017 +0200
'+', '-' changes encoder weights on gravitatory and inertial (also manages textview)
glade/app1.glade | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
src/gui/encoder.cs | 36 +++++++++++++++++++++++--
2 files changed, 105 insertions(+), 3 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index bf5d066..fbf3176 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1360,6 +1360,12 @@
<placeholder/>
</child>
<child>
+ <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>
@@ -15041,6 +15047,36 @@ Concentric</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkButton"
id="fake_button_encoder_exercise_weight_plus">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <signal name="clicked"
handler="on_fake_button_encoder_exercise_weight_plus_clicked" swapped="no"/>
+ <accelerator key="plus" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="fake_button_encoder_exercise_weight_minus">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <signal name="clicked"
handler="on_fake_button_encoder_exercise_weight_minus_clicked" swapped="no"/>
+ <accelerator key="minus" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -15108,6 +15144,36 @@ Concentric</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkButton"
id="fake_button_encoder_exercise_im_weights_n_plus">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <signal name="clicked"
handler="on_fake_button_encoder_exercise_im_weights_n_plus_clicked" swapped="no"/>
+ <accelerator key="plus" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="fake_button_encoder_exercise_im_weights_n_minus">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="relief">none</property>
+ <signal name="clicked"
handler="on_fake_button_encoder_exercise_im_weights_n_minus_clicked" swapped="no"/>
+ <accelerator key="minus" signal="clicked"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -21011,6 +21077,12 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 5c98f7c..83cd23f 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -124,7 +124,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Notebook notebook_encoder_sup;
[Widget] Gtk.Notebook notebook_encoder_capture;
-
+
[Widget] Gtk.Box hbox_combo_encoder_exercise_capture;
[Widget] Gtk.ComboBox combo_encoder_exercise_capture;
[Widget] Gtk.RadioButton radio_encoder_eccon_concentric;
@@ -404,7 +404,6 @@ public partial class ChronoJumpWindow
//TODO: on cross, spline and force speed and power speed should have a spar value higher, like 0.7.
On the other hand, the other cross graphs, haveload(mass) in the X lot more discrete, there is good to put 0.5
-
private void encoderInitializeStuff()
{
encoder_pulsebar_capture.Fraction = 1;
@@ -462,7 +461,6 @@ public partial class ChronoJumpWindow
showTriggerTab(false);
}
-
void on_button_encoder_select_clicked (object o, EventArgs args)
{
encoder_configuration_win = EncoderConfigurationWindow.View(
@@ -535,6 +533,22 @@ public partial class ChronoJumpWindow
* spin does not change anything
*/
+ //add-remove weights on encoder inertial using '+', '-'
+ private void on_fake_button_encoder_exercise_im_weights_n_plus_clicked(object o, EventArgs args)
+ {
+ if(textview_encoder_signal_comment.IsFocus)
+ textview_encoder_signal_comment.Buffer.Text += '+';
+ else
+ on_button_encoder_im_weights_n_plus_clicked (new object (), new EventArgs ());
+ }
+ private void on_fake_button_encoder_exercise_im_weights_n_minus_clicked(object o, EventArgs args)
+ {
+ if(textview_encoder_signal_comment.IsFocus)
+ textview_encoder_signal_comment.Buffer.Text += '-';
+ else
+ on_button_encoder_im_weights_n_minus_clicked (new object (), new EventArgs ());
+ }
+
void on_button_encoder_im_weights_n_minus_clicked (object o, EventArgs args) {
changeImWeights(-1);
}
@@ -910,6 +924,22 @@ public partial class ChronoJumpWindow
* entry changes de spin
* spin does not change anything
*/
+
+ //add-remove weights on encoder gravitatory using '+', '-'
+ private void on_fake_button_encoder_exercise_weight_plus_clicked(object o, EventArgs args)
+ {
+ if(textview_encoder_signal_comment.IsFocus)
+ textview_encoder_signal_comment.Buffer.Text += '+';
+ else
+ on_button_encoder_raspberry_extra_weight_plus_1_clicked (new object (), new EventArgs
());
+ }
+ private void on_fake_button_encoder_exercise_weight_minus_clicked(object o, EventArgs args)
+ {
+ if(textview_encoder_signal_comment.IsFocus)
+ textview_encoder_signal_comment.Buffer.Text += '-';
+ else
+ on_button_encoder_raspberry_extra_weight_minus_1_clicked (new object (), new
EventArgs ());
+ }
void on_button_encoder_raspberry_extra_weight_minus_10_clicked (object o, EventArgs args) {
rapsberryChangeExtraWeight(-10);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]