Browse Source

check fix

Bart Reedijk 10 years ago
parent
commit
f4eb4c3b30
1 changed files with 7 additions and 3 deletions
  1. 7 3
      Proftaak Remote Healthcare/FietsClientV2/DataHandler.cs

+ 7 - 3
Proftaak Remote Healthcare/FietsClientV2/DataHandler.cs

@@ -100,10 +100,14 @@ namespace FietsClient
 
         public void sendData(string data)
         {
-            if (ComPort != null || ComPort.IsOpen)
+            if (ComPort != null)
             {
-                bufferOut = data;
-                ComPort.WriteLine(data);
+                if (ComPort.IsOpen)
+                {
+                    bufferOut = data;
+                    ComPort.WriteLine(data);
+                }
+                
             }
         }