[chronojump] ForceSensor interpolated path line width can be adjusted



commit 79d0196043c1fb73a9cc99129f2f36c484fe13e2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 19 12:15:29 2021 +0200

    ForceSensor interpolated path line width can be adjusted

 glade/repetitive_conditions.glade | 57 +++++++++++++++++++++++++++++++++++++++
 src/gui/app1/forceSensor.cs       |  9 ++++---
 src/gui/repetitiveConditions.cs   |  5 ++++
 3 files changed, 68 insertions(+), 3 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index 868132c45..5c284f0d2 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -4983,6 +4983,63 @@
                                         <property name="position">3</property>
                                       </packing>
                                     </child>
+                                    <child>
+                                      <widget class="GtkHBox" id="hbox54">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">False</property>
+                                        <property name="spacing">4</property>
+                                        <child>
+                                          <widget class="GtkLabel" id="label65">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="label">Line width</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkSpinButton" 
id="spin_force_sensor_capture_feedback_path_line_width">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="invisible_char">●</property>
+                                            <property name="invisible_char_set">True</property>
+                                            <property name="primary_icon_activatable">False</property>
+                                            <property name="secondary_icon_activatable">False</property>
+                                            <property name="primary_icon_sensitive">True</property>
+                                            <property name="secondary_icon_sensitive">True</property>
+                                            <property name="adjustment">100 1 400 1 10 0</property>
+                                            <property name="climb_rate">1</property>
+                                            <property name="numeric">True</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">False</property>
+                                            <property name="fill">False</property>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <widget class="GtkLabel" id="label67">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="xalign">0</property>
+                                            <property name="label">px</property>
+                                          </widget>
+                                          <packing>
+                                            <property name="expand">True</property>
+                                            <property name="fill">True</property>
+                                            <property name="position">2</property>
+                                          </packing>
+                                        </child>
+                                      </widget>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">4</property>
+                                      </packing>
+                                    </child>
                                   </widget>
                                 </child>
                               </widget>
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 095033e72..9c0bbf5b9 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -134,7 +134,7 @@ public partial class ChronoJumpWindow
        Gdk.GC pen_gray_force_capture_discont;
        Pango.Layout layout_force_text;
        Gdk.Colormap colormapForce = Gdk.Colormap.System;
-       private const int interpolatedPathLineWidth = 120;
+       private const int interpolatedPathLineWidthDefault = 100;
 
 
        string forceSensorNotConnectedString =
@@ -194,7 +194,7 @@ public partial class ChronoJumpWindow
 
                pen_blue_light_force_capture_interpolated_feedback = new 
Gdk.GC(force_capture_drawingarea.GdkWindow);
                pen_blue_light_force_capture_interpolated_feedback.Foreground = UtilGtk.LIGHT_BLUE_PLOTS;
-               pen_blue_light_force_capture_interpolated_feedback.SetLineAttributes 
(interpolatedPathLineWidth, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
+               pen_blue_light_force_capture_interpolated_feedback.SetLineAttributes 
(interpolatedPathLineWidthDefault, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
 
                //pen_yellow_force_capture = new Gdk.GC(force_capture_drawingarea.GdkWindow);
                //pen_yellow_force_capture.Foreground = UtilGtk.YELLOW;
@@ -1068,9 +1068,12 @@ public partial class ChronoJumpWindow
 
                if(repetitiveConditionsWin.GetForceSensorFeedbackPathActive)
                {
-                       int maxPathValue = repetitiveConditionsWin.GetForceSensorFeedbackPathMax;// + 
interpolatedPathLineWidth;
+                       int maxPathValue = repetitiveConditionsWin.GetForceSensorFeedbackPathMax;// + 
repetitiveConditionsWin.GetForceSensorFeedbackPathLineWidth (but in N, not in px)
                        if(maxPathValue > forceSensorTopRectangleAtOperationStart)
                                fscPoints.RealHeightG = maxPathValue;
+
+                       pen_blue_light_force_capture_interpolated_feedback.SetLineAttributes 
(repetitiveConditionsWin.GetForceSensorFeedbackPathLineWidth,
+                                       Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
                }
 
 
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index 48117a723..87431b323 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -198,6 +198,7 @@ public class RepetitiveConditionsWindow
        [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_min;
        [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_masters;
        [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_master_seconds;
+       [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_line_width;
 
        const int JUMPSRUNSPAGE = 0;
        const int ENCODERAUTOPAGE = 1;
@@ -997,6 +998,10 @@ public class RepetitiveConditionsWindow
                get { return Convert.ToInt32(spin_force_sensor_capture_feedback_path_master_seconds.Value); }
                //get { return 5; }
        }
+       public int GetForceSensorFeedbackPathLineWidth {
+               get { return Convert.ToInt32(spin_force_sensor_capture_feedback_path_line_width.Value); }
+               //get { return 100; }
+       }
 
        /* JUMPS */
        public bool TfTcBest {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]