[chronojump] Check on forceSensorCaptureDo port.ReadLine() has one '; '



commit cefa6748fa4106eb3a9640d2fe0fc31f1da28330
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sat Jun 10 19:23:51 2017 -0300

    Check on forceSensorCaptureDo port.ReadLine() has one ';'

 src/gui/forceSensor.cs |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 4eedaad..c8191a1 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -123,6 +123,10 @@ public partial class ChronoJumpWindow
                {
                        str = port.ReadLine();
 
+                       //check if there is one and only one ';'
+                       if( ! (str.Contains(";") && str.IndexOf(";") == str.LastIndexOf(";")) )
+                               continue;
+
                        string [] strFull = str.Split(new char[] {';'});
                        //LogB.Information("str: " + str);
 


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