From 232639e3e2462c2a4064fb98956a626db7b287f5 Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Tue, 20 Oct 2015 17:06:50 +0200 Subject: [PATCH] Bugfix for ergometer crash --- ErgometerLibrary/Meting.cs | 2 +- ErgometerLibrary/NetCommand.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ErgometerLibrary/Meting.cs b/ErgometerLibrary/Meting.cs index d65391e..0f2fba6 100644 --- a/ErgometerLibrary/Meting.cs +++ b/ErgometerLibrary/Meting.cs @@ -70,7 +70,7 @@ namespace ErgometerLibrary string[] status = input.Split(delimiter); if (status.Length != 8 && status.Length != 9) { - return null; + throw new FormatException("Error in Meting: Arguments do not match"); } int heartbeat = int.Parse(status[0]); int rpm = int.Parse(status[1]); diff --git a/ErgometerLibrary/NetCommand.cs b/ErgometerLibrary/NetCommand.cs index 3fc805f..6bf167e 100644 --- a/ErgometerLibrary/NetCommand.cs +++ b/ErgometerLibrary/NetCommand.cs @@ -22,7 +22,7 @@ namespace ErgometerLibrary public ValueType Value { get; set; } public RequestType Request { get; set; } public LengthType Length { get; set; } - public double SetValue { get; set; } + public int SetValue { get; set; } public string DisplayName { get; set; } public bool IsDoctor { get; set; } public string Password { get; set; }