From 314a1964b612509af48983309cbc5b5b16fa134b Mon Sep 17 00:00:00 2001 From: Janco Kock Date: Mon, 2 Nov 2015 15:00:47 +0100 Subject: [PATCH] Fixed string.format bug (reverted from commit 34ade8178bf263e904378b423f801470e0600fb7) --- ErgometerIPR/ErgometerApplication/ErgometerTest.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ErgometerIPR/ErgometerApplication/ErgometerTest.cs b/ErgometerIPR/ErgometerApplication/ErgometerTest.cs index 2e7944d..7907f89 100644 --- a/ErgometerIPR/ErgometerApplication/ErgometerTest.cs +++ b/ErgometerIPR/ErgometerApplication/ErgometerTest.cs @@ -47,7 +47,11 @@ namespace ErgometerApplication List last10 = MainClient.Metingen.GetRange(MainClient.Metingen.Count - 10, 10); int max = FindMaxValue(last10, x => x.HeartBeat); int min = FindMinValue(last10, x => x.HeartBeat); - if(max - min > 10) //Hartslag niet stabiel + if(max + min < 20) + { + client.updateStepsText("We detecteren geen hartslag. Controleer of de hartslagmeter is verbonden."); + } + else if (max - min > 10) //Hartslag niet stabiel { client.updateStepsText("Uw hartslag is niet stabiel, probeer een tempo van 50 rpm aan te houden. De test gaat automatisch verder."); return; @@ -60,6 +64,13 @@ namespace ErgometerApplication client.updateStepsText("De warmup is voltooid. U begint nu aan de " + NumToText(GetCurrentWorkload()) + " workload."); } } + if (MainClient.GetLastMeting().Seconds > 8 && MainClient.GetLastMeting().Seconds < 10) + { + if(MainClient.GetLastMeting().HeartBeat < 20) + { + client.updateStepsText("We detecteren geen hartslag. Controleer of de hartslagmeter is verbonden."); + } + } break; case state.WORKLOAD: if (MainClient.GetLastMeting().Seconds - workloadStarted > 180)