[chronojump] maximumIsometricForce receives path to r-scripts



commit 04e8697e7af4d15fd0914d74932c301a1da1dc3a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Apr 19 15:42:25 2018 +0200

    maximumIsometricForce receives path to r-scripts

 r-scripts/maximumIsometricForce.R |    5 +++--
 src/forceSensor.cs                |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/r-scripts/maximumIsometricForce.R b/r-scripts/maximumIsometricForce.R
index 21261ed..3ff9cc4 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -46,7 +46,8 @@ assignOptions <- function(options)
                 drawRfdOptions          = drawRfdOptions,
                 drawImpulseOptions      = options[16],
                testLength              = as.numeric(options[17]),
-               title                   = options[18]
+               title                   = options[18],
+                scriptsPath            = options[19]
         ))
 }
 
@@ -65,7 +66,7 @@ options <- scan(optionsFile, comment.char="#", what=character(), sep="\n")
 op <- assignOptions(options)
 print(op)
 
-source("/usr/local/share/chronojump/r-scripts/scripts-util.R") #TODO: Read spcriptPath from Roptions.txt
+source(paste(op$scriptsPath, "/scripts-util.R", sep=""))
 
 
 #Fits the data to the model f = fmax*(1 - exp(-K*t))
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 27bb5e8..8759b18 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -500,7 +500,8 @@ public class ForceSensorGraph
 
                scriptOptions +=
                        "\n#testLength\n" +             testLength.ToString() + "\n" +
-                       "#title\n" +                    title + "\n";
+                       "#title\n" +                    title + "\n" +
+                       "#scriptsPath\n" +              UtilEncoder.GetmifPath() + "\n";
 
                TextWriter writer = File.CreateText(Path.GetTempPath() + "Roptions.txt");
                writer.Write(scriptOptions);


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