[chronojump] Fixing R-capture windows
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixing R-capture windows
- Date: Fri, 16 Jan 2015 12:58:32 +0000 (UTC)
commit 24b7ae4640e65fb4f3ef77a94f8ef810886e1e45
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Jan 16 13:56:42 2015 +0100
Fixing R-capture windows
encoder/capture.R | 2 +-
src/gui/encoder.cs | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/encoder/capture.R b/encoder/capture.R
index 8fca49b..852f6f3 100644
--- a/encoder/capture.R
+++ b/encoder/capture.R
@@ -89,7 +89,7 @@ while(input[1] != "Q") {
#do not use print because it shows the [1] first. Use cat:
cat(paste(paf$meanSpeed, paf$maxSpeed, paf$maxSpeedT, paf$meanPower, paf$peakPower, paf$peakPowerT,
paf$pp_ppt, sep=", "))
- cat("\n") #mandatory
+ cat("\n") #mandatory to read this from C#, but beware, there we will need a trim to remove the
windows \r\n
input <- readLines(f, n = 1L)
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index b9badcc..997ea7a 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -4724,8 +4724,14 @@ LogB.Debug("D");
{
if (!String.IsNullOrEmpty(curveFromR.Data))
{
+
+ LogB.Warning("Without trim");
LogB.Warning(curveFromR.Data);
+ string trimmed = curveFromR.Data;
+ LogB.Warning("With trim");
+ LogB.Warning(trimmed);
+
/*
encoderCaptureStringR +=
string.Format("\n{0},2,a,3,4,{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},7",
ecca.curvesAccepted +1,
@@ -4736,7 +4742,7 @@ LogB.Debug("D");
Util.ConvertToPoint(peakPowerT*1000), Util.ConvertToPoint(peakPower /
peakPowerT)
*/
- string [] strs = curveFromR.Data.Split(new char[] {','});
+ string [] strs = trimmed.Split(new char[] {','});
encoderCaptureStringR +=
string.Format("\n{0},2,a,3,4,{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},7",
0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]