[chronojump] forceSensor gui code reorganization



commit 8741a5bd7b364893b665d8ae79b9b595da35b7b2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Dec 11 17:01:46 2019 +0100

    forceSensor gui code reorganization

 po/POTFILES.in                    |  2 +-
 src/Makefile.am                   |  2 +-
 src/forceSensor.cs                | 29 +++++++++++++++++++++++++++++
 src/gui/{ => app1}/forceSensor.cs | 29 -----------------------------
 4 files changed, 31 insertions(+), 31 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cb4cf430..848e931e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -59,6 +59,7 @@ src/exportSession.cs
 src/forceSensor.cs
 src/gui/app1/chronojump.cs
 src/gui/app1/contactsExercise.cs
+src/gui/app1/forceSensor.cs
 src/gui/app1/jump.cs
 src/gui/app1/run.cs
 src/gui/chronopic.cs
@@ -77,7 +78,6 @@ src/gui/executeAuto.cs
 src/gui/forceSensorAnalyze.cs
 src/gui/forceSensorElasticBands.cs
 src/gui/forceSensorExercise.cs
-src/gui/forceSensor.cs
 src/gui/genericWindow.cs
 src/gui/helpPorts.cs
 src/gui/jump.cs
diff --git a/src/Makefile.am b/src/Makefile.am
index 9c761954..f7d746f3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,6 +7,7 @@ LINK = $(REF_DEP_CHRONOJUMP)
 SOURCES = \
        gui/app1/chronojump.cs\
        gui/app1/contactsExercise.cs\
+       gui/app1/forceSensor.cs\
        gui/app1/jump.cs\
        gui/app1/run.cs\
        gui/chronojumpIcons.cs\
@@ -27,7 +28,6 @@ SOURCES = \
        gui/event.cs\
        gui/executeAuto.cs\
        gui/exhibition.cs\
-       gui/forceSensor.cs\
        gui/forceSensorAnalyze.cs\
        gui/forceSensorElasticBands.cs\
        gui/forceSensorExercise.cs\
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index c3a25988..6cac4f14 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -634,6 +634,35 @@ public class ForceSensorElasticBand
        }
 }
 
+//struct with relevant data used on various functions and threads
+public class ForceSensorValues
+{
+       public int TimeLast; //store last time
+       public int TimeForceMax; //store time of max force
+       public double ForceLast; //store last force
+       public double ForceMax; //store max force
+       public double ForceMin; //store min force
+
+       public ForceSensorValues()
+       {
+               TimeLast = 0;
+               TimeForceMax = 0;
+               ForceLast = 0;
+               ForceMax = 0;
+               ForceMin = 10000;
+       }
+
+       public void SetMaxMinIfNeeded(double force, int time)
+       {
+               if(force > ForceMax)
+               {
+                       ForceMax = force;
+                       TimeForceMax = time;
+               }
+               if(force < ForceMin)
+                       ForceMin = force;
+       }
+}
 /*
  * TODO: this class only contains points plot stuff
  * currently all the code relevant to force sensor actions is on gui/forcesensor.cs
diff --git a/src/gui/forceSensor.cs b/src/gui/app1/forceSensor.cs
similarity index 99%
rename from src/gui/forceSensor.cs
rename to src/gui/app1/forceSensor.cs
index 4cb96558..b8c92372 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -31,35 +31,6 @@ using System.Collections.Generic; //List<T>
 using System.Text.RegularExpressions; //Regex
 using Mono.Unix;
 
-//struct with relevant data used on various functions and threads
-public class ForceSensorValues
-{
-       public int TimeLast; //store last time
-       public int TimeForceMax; //store time of max force
-       public double ForceLast; //store last force
-       public double ForceMax; //store max force
-       public double ForceMin; //store min force
-
-       public ForceSensorValues()
-       {
-               TimeLast = 0;
-               TimeForceMax = 0;
-               ForceLast = 0;
-               ForceMax = 0;
-               ForceMin = 10000;
-       }
-
-       public void SetMaxMinIfNeeded(double force, int time)
-       {
-               if(force > ForceMax)
-               {
-                       ForceMax = force;
-                       TimeForceMax = time;
-               }
-               if(force < ForceMin)
-                       ForceMin = force;
-       }
-}
 
 public partial class ChronoJumpWindow 
 {


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