From e94ed04d23dccf8dfba80934ac266a8482fe197b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20B=C3=B6hler?= Date: Tue, 16 Mar 2021 19:43:27 +0100 Subject: [PATCH] Fix FA21RF smoke detector detection --- RFLink/Plugins/Plugin_080.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFLink/Plugins/Plugin_080.c b/RFLink/Plugins/Plugin_080.c index 6ceb694f..8ee46886 100644 --- a/RFLink/Plugins/Plugin_080.c +++ b/RFLink/Plugins/Plugin_080.c @@ -37,7 +37,7 @@ #define FA20_PLUGIN_ID 080 #define PLUGIN_DESC_080 "FA20RF" -#define FA20_PULSECOUNT 52 +#define FA20_PULSECOUNT 50 #define FA20_MIDHI 1000 / RAWSIGNAL_SAMPLE_RATE #define FA20_PULSEMIN 1000 / RAWSIGNAL_SAMPLE_RATE @@ -57,7 +57,7 @@ boolean Plugin_080(byte function, char *string) //================================================================================== // Get all 24 bits //================================================================================== - for (byte x = 4; x < FA20_PULSECOUNT; x += 2) + for (byte x = 2; x < FA20_PULSECOUNT; x += 2) { if (RawSignal.Pulses[x - 1] > FA20_MIDHI) return false; // every preceding pulse must be below 1000!