[chronojump] Removed unused code



commit 1f8dd2802f09cef707d02ba81cbbbcfe15652e0d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Apr 29 12:21:18 2015 +0200

    Removed unused code

 src/gui/encoder.cs |    8 --------
 src/utilEncoder.cs |   41 -----------------------------------------
 2 files changed, 0 insertions(+), 49 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index da095c7..1b900db 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -3924,8 +3924,6 @@ public partial class ChronoJumpWindow
        static List<string> encoderCaptureStringR;
        static ArrayList captureCurvesBarsData;
        
-       double massDisplacedEncoder = 0;
-       
        //if we are capturing, play sounds
        void plotCurvesGraphDoPlot(string mainVariable, double mainVariableHigher, double mainVariableLower, 
                        ArrayList data6Variables, bool capturing) 
@@ -4375,12 +4373,6 @@ public partial class ChronoJumpWindow
                                        deleteAllCapturedCurveFiles();
 
                                        capturingCsharp = encoderCaptureProcess.CAPTURING;
-
-                                       massDisplacedEncoder = UtilEncoder.GetMassByEncoderConfiguration( 
encoderConfigurationCurrent, 
-                                                       findMass(Constants.MassType.BODY), 
findMass(Constants.MassType.EXTRA),
-                                                       getExercisePercentBodyWeightFromCombo() );
-
-                                       
                                }
 
                                if(action == encoderActions.CAPTURE) {
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 6887ce5..8a6220c 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -794,47 +794,6 @@ public class UtilEncoder
                return data;
        }
 
-       //gearedDown is positive, normally 2
-       private static double getMass(double mass, int gearedDown, int angle) {
-               if(mass == 0)
-                       return 0;
-
-               return ( ( mass / gearedDown ) * Math.Sin( angle * Math.PI / 180 ) );
-       }
-
-       private static double getMassBodyByExercise(double massBody, int exercisePercentBodyWeight) {
-               if(massBody == 0 || exercisePercentBodyWeight == 0)
-                       return 0;
-
-               return (massBody * exercisePercentBodyWeight / 100.0);
-       }
-
-       public static double GetMassByEncoderConfiguration(
-                       EncoderConfiguration ec, double massBody, double massExtra, int 
exercisePercentBodyWeight)
-       {
-               massBody = getMassBodyByExercise(massBody, exercisePercentBodyWeight);
-
-               if(
-                       ec.name == Constants.EncoderConfigurationNames.WEIGHTEDMOVPULLEYLINEARONPERSON1 ||
-                       ec.name == Constants.EncoderConfigurationNames.WEIGHTEDMOVPULLEYLINEARONPERSON1INV ||
-                       ec.name == Constants.EncoderConfigurationNames.WEIGHTEDMOVPULLEYLINEARONPERSON2 ||
-                       ec.name == Constants.EncoderConfigurationNames.WEIGHTEDMOVPULLEYLINEARONPERSON2INV ||
-                       ec.name == Constants.EncoderConfigurationNames.WEIGHTEDMOVPULLEYROTARYFRICTION ||
-                       ec.name == Constants.EncoderConfigurationNames.WEIGHTEDMOVPULLEYROTARYAXIS 
-                 ) {
-                       massExtra = getMass(massExtra, ec.gearedDown, ec.anglePush);
-               } 
-               else if(ec.name == Constants.EncoderConfigurationNames.LINEARONPLANE) {
-                       massBody = getMass(massBody, ec.gearedDown, ec.anglePush);
-                       massExtra = getMass(massExtra, ec.gearedDown, ec.anglePush);
-               }
-               else if(ec.name == Constants.EncoderConfigurationNames.LINEARONPLANEWEIGHTDIFFANGLE) {
-                       massBody = getMass(massBody, ec.gearedDown, ec.anglePush);
-                       massExtra = getMass(massExtra, ec.gearedDown, ec.angleWeight);
-               }
-
-               return (massBody + massExtra);
-       }
 
        /* ----end of EncoderConfiguration, kinematics and Dynamics ---- */ 
 


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