[chronojump] ForceSensor ExportFiles sending URL to R cares for \\ to / on Windows
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor ExportFiles sending URL to R cares for \\ to / on Windows
- Date: Thu, 10 Jun 2021 08:50:52 +0000 (UTC)
commit fa243c9b1405d35a745d1edde1395b2d4aeceddc
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jun 10 10:49:55 2021 +0200
ForceSensor ExportFiles sending URL to R cares for \\ to / on Windows
src/exportFiles/fs.cs | 2 ++
src/forceSensor.cs | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/src/exportFiles/fs.cs b/src/exportFiles/fs.cs
index 8b0632524..d052a5292 100644
--- a/src/exportFiles/fs.cs
+++ b/src/exportFiles/fs.cs
@@ -248,6 +248,7 @@ public class ForceSensorExport : ExportFiles
addedSet = true;
}
fsgABe_l.Add(new ForceSensorGraphABExport (
+ isWindows,
fs.FullURL,
Util.CSVDecimalColumnIsPoint(fs.FullURL, 1),
fsAI.ForceMAX, //raw
@@ -306,6 +307,7 @@ public class ForceSensorExport : ExportFiles
addedSet = true;
}
fsgABe_l.Add(new ForceSensorGraphABExport (
+ isWindows,
fs.FullURL,
Util.CSVDecimalColumnIsPoint(fs.FullURL, 1),
fsAI.ForceMAX, //raw
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 0b44d5e82..58559d3b5 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -1644,6 +1644,7 @@ public class ForceSensorGraphAB
//this class creates the rows of each force sensor AB for the csv input multi that is read by R
public class ForceSensorGraphABExport: ForceSensorGraphAB
{
+ private bool isWindows;
public string fullURL;
public bool decimalIsPoint;
public double maxForceRaw;
@@ -1657,6 +1658,7 @@ public class ForceSensorGraphABExport: ForceSensorGraphAB
public string commentOfSet;
public ForceSensorGraphABExport (
+ bool isWindows,
string fullURL, bool decimalIsPoint, double maxForceRaw,
double maxAvgForceInWindow, double forceSensorAnalyzeMaxAVGInWindowSeconds,
double maxAvgForceInWindowSampleStart, double maxAvgForceInWindowSampleEnd,
@@ -1666,6 +1668,7 @@ public class ForceSensorGraphABExport: ForceSensorGraphAB
{
assignParams(fsco, startSample, endSample, title, exercise, date, time, triggerList);
+ this.isWindows = isWindows;
this.fullURL = fullURL;
this.decimalIsPoint = decimalIsPoint;
this.maxForceRaw = maxForceRaw;
@@ -1690,7 +1693,11 @@ public class ForceSensorGraphABExport: ForceSensorGraphAB
decimalChar = localeInfo.NumberDecimalSeparator;
}
- return fullURL + ";" +
+ string url = fullURL;
+ if(isWindows)
+ url = url.Replace("\\","/");
+
+ return url + ";" +
decimalChar + ";" +
Util.ConvertToPoint(maxForceRaw) + ";" +
Util.ConvertToPoint(maxAvgForceInWindow) + ";" +
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]