[chronojump] ForceSensor capture interpolated path with negative values
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor capture interpolated path with negative values
- Date: Thu, 27 May 2021 09:16:55 +0000 (UTC)
commit 6baf592eec512477ccfe3769867acebc7cca5bf1
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu May 27 11:15:16 2021 +0200
ForceSensor capture interpolated path with negative values
glade/repetitive_conditions.glade | 2 +-
src/forceSensor.cs | 4 ++--
src/gui/app1/forceSensor.cs | 4 ++++
3 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/glade/repetitive_conditions.glade b/glade/repetitive_conditions.glade
index af6e04ced..ef774e3b0 100644
--- a/glade/repetitive_conditions.glade
+++ b/glade/repetitive_conditions.glade
@@ -5036,7 +5036,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">50 0 9999 1 10
0</property>
+ <property name="adjustment">50 -9999 9999 1 10
0</property>
<property name="climb_rate">1</property>
<property name="numeric">True</property>
<signal name="value_changed"
handler="on_spin_force_sensor_capture_feedback_path_min_value_changed" swapped="no"/>
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 3266cf318..0b44d5e82 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -832,9 +832,9 @@ public class ForceSensorCapturePoints
public int RealWidthG; //width of graph in microseconds (will be upgraded if needed, but not while
capturing on scroll)
public const int DefaultRealHeightG = 2;
- public const int DefaultRealHeightGNeg = 2;
+ public const int DefaultRealHeightGNeg = 2; //absolute values
public int RealHeightG; //Newtons (will be upgraded if needed)
- public int RealHeightGNeg; //Newtons (negative) (will be upgraded if needed)
+ public int RealHeightGNeg; //Newtons (negative) (will be upgraded if needed) //absolute values
//for displacement
public const int DefaultRealHeightGDispl = 1;
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 1a8e31a58..6873e529e 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -1084,6 +1084,10 @@ public partial class ChronoJumpWindow
int maxPathValue = repetitiveConditionsWin.GetForceSensorFeedbackPathMax;
if(maxPathValue > forceSensorTopRectangleAtOperationStart)
fscPoints.RealHeightG = maxPathValue;
+
+ //also care for negative paths
+ if(repetitiveConditionsWin.GetForceSensorFeedbackPathMin < 0)
+ fscPoints.RealHeightGNeg =
Math.Abs(repetitiveConditionsWin.GetForceSensorFeedbackPathMin); //Neg is expressed in absolute values
}
LogB.Information("RealHeight = " + fscPoints.RealHeightG.ToString());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]