[chronojump] Fixed encoder inertial feedback historical



commit addb72c13e9fd5462cb983115ae00b38dd466d36
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed May 13 21:27:31 2020 +0200

    Fixed encoder inertial feedback historical

 src/encoder.cs          | 5 +++++
 src/gui/app1/encoder.cs | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/encoder.cs b/src/encoder.cs
index be78bf88..f143707c 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -1905,6 +1905,11 @@ public class EncoderConfiguration
                inertiaTotal = UtilEncoder.CalculeInertiaTotal(this);
        }
 
+       public bool Equals(EncoderConfiguration other)
+       {
+               return (this.ToStringOutput(Outputs.SQL) == other.ToStringOutput(Outputs.SQL));
+       }
+
        public void ReadParamsFromSQL (string [] strFull) 
        {
                //adds other params
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 8a278bc1..67d3dbaa 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -696,7 +696,7 @@ public partial class ChronoJumpWindow
                {
                        foreach(EncoderSQL es in arrayTemp)
                        {
-                               if(es.encoderConfiguration == encoderConfigurationCurrent)
+                               if(encoderConfigurationCurrent.Equals(es.encoderConfiguration))
                                {
                                        if(Convert.ToDouble(es.future1) > maxPowerIntersession)
                                                maxPowerIntersession = Convert.ToDouble(es.future1);


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