[chronojump] TriggerList ToRCurvesString can choose the separation char
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] TriggerList ToRCurvesString can choose the separation char
- Date: Wed, 10 Mar 2021 19:21:35 +0000 (UTC)
commit 8e59f04119ae163d47388389b2b608b32c48426c
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Mar 10 20:21:16 2021 +0100
TriggerList ToRCurvesString can choose the separation char
src/encoderRProc.cs | 2 +-
src/forceSensor.cs | 2 +-
src/trigger.cs | 8 +++++---
3 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/encoderRProc.cs b/src/encoderRProc.cs
index b3c825cb..477842dc 100644
--- a/src/encoderRProc.cs
+++ b/src/encoderRProc.cs
@@ -538,7 +538,7 @@ public class EncoderRProcAnalyze : EncoderRProc
protected override string printTriggers(TriggerList.Type3 type3)
{
- return triggerList.ToRCurvesString(type3);
+ return triggerList.ToRCurvesString(type3, ';');
}
private void deleteFile(string filename)
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index 3f1439be..5de1c637 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -1872,7 +1872,7 @@ public class ForceSensorGraph
private string printTriggers(TriggerList.Type3 type3)
{
- return triggerList.ToRCurvesString(type3);
+ return triggerList.ToRCurvesString(type3, ';');
}
public static string GetDataDir(int sessionID)
diff --git a/src/trigger.cs b/src/trigger.cs
index 6b344004..0f87c6d0 100644
--- a/src/trigger.cs
+++ b/src/trigger.cs
@@ -170,7 +170,9 @@ public class TriggerList
//best is call here with an ON to print a triggersOnList
//then call here with an OFF
//note on encoder we only use ON, but on runEncoder, we use ON and then OFF
- public string ToRCurvesString(Type3 type3)
+ //usually sepChar will be ';' and all triggers will be on a row
+ //but can be ',' if we pass some ints to a csv
+ public string ToRCurvesString(Type3 type3, char sepChar)
{
if(l.Count == 0)
return TriggersNotFoundString;
@@ -182,12 +184,12 @@ public class TriggerList
if(trigger.InOut && type3 != Type3.OFF)
{
s += sep + trigger.Ms.ToString();
- sep = ";";
+ sep = sepChar.ToString();
}
if(! trigger.InOut && type3 != Type3.ON)
{
s += sep + trigger.Ms.ToString();
- sep = ";";
+ sep = sepChar.ToString();
}
}
return s;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]