[chronojump] ForceSensor capture interpolated path: lineWidth in N
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor capture interpolated path: lineWidth in N
- Date: Mon, 24 May 2021 21:03:26 +0000 (UTC)
commit 1a7db6d8c331cebc5e040d052c06e484ee404fb7
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 24 23:02:50 2021 +0200
ForceSensor capture interpolated path: lineWidth in N
glade/repetitive_conditions.glade | 8 ++++----
src/gui/app1/forceSensor.cs | 21 ++++++++++++---------
src/gui/repetitiveConditions.cs | 6 +++---
3 files changed, 19 insertions(+), 16 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index 07f3bb820..cd844f528 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -5168,7 +5168,7 @@
<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="adjustment">40 1 400 1 10 0</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
</widget>
@@ -5183,7 +5183,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">px</property>
+ <property name="label">N</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -5221,7 +5221,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">100</property>
+ <property name="label">40</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -5233,7 +5233,7 @@
<widget class="GtkLabel" id="label148">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label">px</property>
+ <property name="label">N</property>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 3b8adab75..7452f2317 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -136,7 +136,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 interpolatedPathLineWidthDefault = 100;
+ private const int interpolatedPathLineWidthDefault = 100; //here in px (but later is in N converted
to px)
string forceSensorNotConnectedString =
@@ -1078,16 +1078,8 @@ public partial class ChronoJumpWindow
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);
- pen_red_light_force_capture_interpolated_feedback.SetLineAttributes
(repetitiveConditionsWin.GetForceSensorFeedbackPathLineWidth,
- Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
}
-
-
-
LogB.Information("RealHeight = " + fscPoints.RealHeightG.ToString());
forcePaintHVLines(ForceSensorGraphs.CAPTURE, fscPoints.RealHeightG,
ForceSensorCapturePoints.DefaultRealHeightGNeg, 10, false);
@@ -1651,6 +1643,17 @@ LogB.Information(" fs J ");
if(configChronojump.LowCPU)
event_execute_label_message.Text = "Disabled real time graph on this device";
else {
+ //set interpolated pen lineWidth
+ if(interpolate_l != null) {
+ int lineWidth = fscPoints.GetForceInPx(0) -
+
fscPoints.GetForceInPx(repetitiveConditionsWin.GetForceSensorFeedbackPathLineWidth);
+
+ pen_blue_light_force_capture_interpolated_feedback.SetLineAttributes (
+ lineWidth, Gdk.LineStyle.Solid, Gdk.CapStyle.Round,
Gdk.JoinStyle.Round);
+ pen_red_light_force_capture_interpolated_feedback.SetLineAttributes (
+ lineWidth, Gdk.LineStyle.Solid, Gdk.CapStyle.Round,
Gdk.JoinStyle.Round);
+ }
+
//note that scroll mode will call NOScroll method until scroll starts
if(preferences.forceSensorCaptureScroll && fscPoints.ScrollStartedAtCount > 0)
forceSensorCaptureDoRealtimeGraphScroll(numCaptured, toDraw, points);
diff --git a/src/gui/repetitiveConditions.cs b/src/gui/repetitiveConditions.cs
index b6aa021ae..8bdf9e1f2 100644
--- a/src/gui/repetitiveConditions.cs
+++ b/src/gui/repetitiveConditions.cs
@@ -198,7 +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;
+ [Widget] Gtk.SpinButton spin_force_sensor_capture_feedback_path_line_width; //N
const int JUMPSRUNSPAGE = 0;
const int ENCODERAUTOPAGE = 1;
@@ -1019,8 +1019,8 @@ public class RepetitiveConditionsWindow
//get { return 5; }
}
public int GetForceSensorFeedbackPathLineWidth {
- get { return Convert.ToInt32(spin_force_sensor_capture_feedback_path_line_width.Value); }
- //get { return 100; }
+ get { return Convert.ToInt32(spin_force_sensor_capture_feedback_path_line_width.Value); } //N
+ //get { return 40; }
}
/* JUMPS */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]