[chronojump] small fixes
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] small fixes
- Date: Fri, 21 Mar 2014 12:38:46 +0000 (UTC)
commit b79ee302426da07aad054f9eda004f9ed379d647
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 21 13:38:19 2014 +0100
small fixes
encoder/graph.R | 14 ++++++++++----
src/gui/encoder.cs | 8 +++++---
src/utilEncoder.cs | 7 +++++--
3 files changed, 20 insertions(+), 9 deletions(-)
---
diff --git a/encoder/graph.R b/encoder/graph.R
index 7eb5380..2d18d2d 100644
--- a/encoder/graph.R
+++ b/encoder/graph.R
@@ -1888,6 +1888,10 @@ getDynamicsInertial <- function(encoderConfigurationName, displacement, d, D, ma
angleSpeed = getSpeed(angle, smoothing) #rads/ms
angleAccel = getAcceleration(angleSpeed) #rads/ms²
angleAccel$y = angleAccel$y * 1000 #rads/ms² -> rads/s²
+
+ #use the values
+ angleSpeed = angleSpeed$y
+ angleAccel = angleAccel$y
}
force = abs(inertiaMomentum * angleAccel) * (2 / d.m) + mass * (accel + g)
@@ -1981,11 +1985,13 @@ doProcess <- function(options) {
OperatingSystem=options[27] #if this changes, change it also at start of this R file
#IMPORTANT, if this grows, change the readLines value on getOptionsFromFile
- scriptUtilR = options[28]
- scriptNeuromuscularProfileR = options[29]
+ scriptOne = options[28] #usually util.R
+ scriptTwo = options[29] #usually neuromuscularProfile.R
#--- include files ---
- source(scriptUtilR)
- source(scriptNeuromuscularProfileR)
+ if(scriptOne != "none")
+ source(scriptOne)
+ if(scriptTwo != "none")
+ source(scriptTwo)
print(File)
print(OutputGraph)
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 02868cc..30b85e9 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -721,7 +721,8 @@ public partial class ChronoJumpWindow
Util.ChangeSpaceAndMinusForUnderscore(currentPerson.Name) + "-" +
Util.ChangeSpaceAndMinusForUnderscore(UtilGtk.ComboGetActive(combo_encoder_exercise)) +
"-(" + Util.ConvertToPoint(findMass(Constants.MassType.DISPLACED)) + "Kg)",
- es);
+ es,
+ false); //do not use neuromuscularProfile script
if(result)
//store this to show 1,2,3,4,... or 1e,1c,2e,2c,... in RenderN
@@ -1324,7 +1325,8 @@ public partial class ChronoJumpWindow
Util.ChangeSpaceAndMinusForUnderscore(currentPerson.Name) + "-" +
Util.ChangeSpaceAndMinusForUnderscore(lastEncoderSQL.exerciseName) +
"-(" + displacedMass + "Kg)",
- encoderStruct);
+ encoderStruct,
+ false); //do not use neuromuscularProfile script
//encoder_pulsebar_capture.Text = string.Format(Catalog.GetString(
// "Exported to {0}."), UtilEncoder.GetEncoderExportTempFileName());
@@ -2365,7 +2367,7 @@ Log.WriteLine(str);
if( ! radiobutton_encoder_analyze_data_user_curves.Active)
titleStr += "-" +
Util.ChangeSpaceAndMinusForUnderscore(UtilGtk.ComboGetActive(combo_encoder_exercise));
- UtilEncoder.RunEncoderGraph(titleStr, encoderStruct);
+ UtilEncoder.RunEncoderGraph(titleStr, encoderStruct, encoderAnalysis ==
"neuromuscularProfile");
}
private void on_radiobutton_encoder_analyze_data_current_signal_toggled (object obj, EventArgs args) {
diff --git a/src/utilEncoder.cs b/src/utilEncoder.cs
index 304ec11..97b1af5 100644
--- a/src/utilEncoder.cs
+++ b/src/utilEncoder.cs
@@ -241,7 +241,7 @@ public class UtilEncoder
}
*/
- public static bool RunEncoderGraph(string title, EncoderStruct es)
+ public static bool RunEncoderGraph(string title, EncoderStruct es, bool neuromuscularProfileDo)
{
CancelRScript = false;
@@ -256,7 +256,10 @@ public class UtilEncoder
string operatingSystem = "Linux";
string scriptUtilR = GetEncoderScriptUtilR();
- string scriptNeuromuscularProfile = GetEncoderScriptNeuromuscularProfile();
+
+ string scriptNeuromuscularProfile = "none"; //cannot be blank
+ if(neuromuscularProfileDo)
+ scriptNeuromuscularProfile = GetEncoderScriptNeuromuscularProfile();
pBin="Rscript";
//pBin="R";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]