From 0145854da88bdba02afdaed84824e297104a770e Mon Sep 17 00:00:00 2001
From: "s.oezguer" <s.oezguer@b2563226-3b6e-f880-5363-0e5704bc5351>
Date: Fri, 16 Sep 2011 20:40:11 +0000
Subject: [PATCH] ignore some noise on receive

---
 RCSwitch.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/RCSwitch.cpp b/RCSwitch.cpp
index 74df2b4..253273c 100644
--- a/RCSwitch.cpp
+++ b/RCSwitch.cpp
@@ -389,7 +389,9 @@ void RCSwitch::receiveInterrupt() {
           }
       }      
       code = code >> 1;
-      (mCallback)(code, changeCount/2, delay, timings);
+	  if (changeCount > 6) {    // ignore < 4bit values as there are no devices sending 4bit values => noise
+        (mCallback)(code, changeCount/2, delay, timings);
+	  }
       repeatCount = 0;
     }
     changeCount = 0;
-- 
GitLab