Fixed even more bugs

This commit is contained in:
Aareschluchtje
2015-09-28 18:46:59 +02:00
parent 659b481c43
commit 62901bc6ec
+5 -4
View File
@@ -67,11 +67,12 @@ namespace ErgometerLibrary
public static Meting Parse(string input, char delimiter)
{
String[] status = input.Split(delimiter);
if (status.Length != 8 || status.Length != 9)
string[] status = input.Split(delimiter);
Console.WriteLine(status.Length);
if (status.Length != 8 && status.Length != 9)
{
return null;
}
int heartbeat = int.Parse(status[0]);
int rpm = int.Parse(status[1]);
double speed = double.Parse(status[2]) / 10;