[chronojump] ForceSensor export R script writes progres files (to be shown on gui)



commit 93f47c018c5d3de0da67dcfbbccd4537617171d6
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 9 19:40:48 2021 +0100

    ForceSensor export R script writes progres files (to be shown on gui)

 r-scripts/maximumIsometricForce.R | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/r-scripts/maximumIsometricForce.R b/r-scripts/maximumIsometricForce.R
index 90eb469b..3b06ce70 100644
--- a/r-scripts/maximumIsometricForce.R
+++ b/r-scripts/maximumIsometricForce.R
@@ -1101,6 +1101,14 @@ if(op$singleOrMultiple == "TRUE")
        doProcess(dataFile, op$decimalChar, op$title, op$exercise, op$datetime, op$captureOptions, 
op$startSample, op$endSample)
 } else
 {
+       #0) prepare progressFolder to show feedback on chronojump
+       progressFolder = paste(tempPath, "/chronojump_mif_progress", sep ="")
+       print (paste("progressFolder", progressFolder))
+       if(dir.exists(progressFolder))
+               do.call(file.remove, list(list.files(progressFolder, full.names = TRUE)))
+       else
+               dir.create(progressFolder)
+
        #1) read the csv
         dataFiles = read.csv(file = paste(tempPath, "/maximumIsometricForceInputMulti.csv", sep=""), 
sep=";", stringsAsFactors=F)
        
@@ -1117,6 +1125,8 @@ if(op$singleOrMultiple == "TRUE")
                        print(message(e))
                })
 
+               progressFilename = paste(progressFolder, "/", i, sep="")
+               file.create(progressFilename)
                print("done")
        }
 


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