From 4a183e0a8afccff9ec7baeb1c9b7d349d540e033 Mon Sep 17 00:00:00 2001 From: tzim Date: Sun, 25 May 2014 09:17:36 +0000 Subject: [PATCH] =?UTF-8?q?Un=20(tout=20petit)=20peu=20de=20tol=C3=A9rance?= =?UTF-8?q?=20dans=20l'accroche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DMX-2.0/SequenceurLineaire.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/DMX-2.0/SequenceurLineaire.cs b/DMX-2.0/SequenceurLineaire.cs index 470d51d..bb025e7 100644 --- a/DMX-2.0/SequenceurLineaire.cs +++ b/DMX-2.0/SequenceurLineaire.cs @@ -150,14 +150,13 @@ namespace DMX2 { valeursrecues [data.id] = data.value; max = valeursrecues.Values.Max (); - /*if (max != data.value) - return true;*/ int val = seq.ValeurBruteCircuit (circuit); - if ((data.prev_value != val) - && ((data.prev_value < val && data.value < val) || - (data.prev_value > val && data.value > val))) { + if ( + (data.prev_value < val-1 && data.value < val-1) || + (data.prev_value > val+1 && data.value > val+1) + ) { attache = false; return true; }