[chronojump] Compujump speed feedback done!
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Compujump speed feedback done!
- Date: Thu, 29 Jun 2017 05:34:34 +0000 (UTC)
commit dd2ad32417d8e56ba69e2c34acdbf487db41152f
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 29 07:34:03 2017 +0200
Compujump speed feedback done!
src/gui/networks.cs | 14 +++++++++++++-
src/gui/repetitiveConditions.cs | 12 +++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 067acf0..3de7f8e 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -568,10 +568,22 @@ public partial class ChronoJumpWindow
else if(task.Laterality == "L")
radio_encoder_laterality_l.Active = true;
+ Pixbuf pixbuf;
if(task.Load > 0)
- {
entry_raspberry_extra_weight.Text = Convert.ToInt32(task.Load).ToString();
+
+ if(task.Speed > 0) {
+ repetitiveConditionsWin.EncoderMeanSpeedHigherValue = task.Speed;
+ repetitiveConditionsWin.EncoderMeanSpeedHigher = true;
+ repetitiveConditionsWin.Encoder_show_manual_feedback = true;
+ repetitiveConditionsWin.Notebook_encoder_conditions_page = 1; //speed
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_active.png");
+ } else {
+ repetitiveConditionsWin.EncoderMeanSpeedHigher = false;
+ repetitiveConditionsWin.Encoder_show_manual_feedback = false;
+ pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "stock_bell_none.png");
}
+ image_encoder_bell.Pixbuf = pixbuf;
//start test if task is parametrized
if(task.Type == 'P')
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 34d4574..4a393b3 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -175,6 +175,7 @@ public class RepetitiveConditionsWindow
createComboEncoderAutomaticVariable();
bestSetValue = 0;
+ notebook_encoder_conditions.CurrentPage = 3; //power
putNonStandardIcons();
}
@@ -227,7 +228,6 @@ public class RepetitiveConditionsWindow
hbox_run_conditions.Show();
frame_conditions.Show();
} else { //encoder (grav and inertial)
- notebook_encoder_conditions.CurrentPage = 3; //power
frame_encoder_automatic_conditions.Show();
vbox_encoder_manual.Show();
if(checkbutton_encoder_show_manual_feedback.Active)
@@ -646,6 +646,14 @@ public class RepetitiveConditionsWindow
return -1;
}
+ public int Notebook_encoder_conditions_page {
+ set { notebook_encoder_conditions.CurrentPage = value; }
+ }
+
+ public bool Encoder_show_manual_feedback {
+ set { checkbutton_encoder_show_manual_feedback.Active = value; }
+ }
+
//height
public bool EncoderHeightHigher {
get { return checkbutton_encoder_height_higher.Active; }
@@ -664,9 +672,11 @@ public class RepetitiveConditionsWindow
//speed
public bool EncoderMeanSpeedHigher {
get { return checkbutton_encoder_mean_speed_higher.Active; }
+ set { checkbutton_encoder_mean_speed_higher.Active = value; } //used on Compujump
}
public double EncoderMeanSpeedHigherValue {
get { return Convert.ToDouble(spinbutton_encoder_mean_speed_higher.Value); }
+ set { spinbutton_encoder_mean_speed_higher.Value = value; } //used on Compujump
}
public bool EncoderMeanSpeedLower {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]