From 56e8c471b9fb2da1d4fc069f861ddc97a29c1d2b Mon Sep 17 00:00:00 2001 From: Christophe Painchaud Date: Fri, 26 Feb 2021 16:03:42 +0100 Subject: [PATCH] Fix for Atlantic devices which have too short break between messages 3800us --- RFLink/Plugins/Plugin_064.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/RFLink/Plugins/Plugin_064.c b/RFLink/Plugins/Plugin_064.c index 57a051cb..ed56d287 100644 --- a/RFLink/Plugins/Plugin_064.c +++ b/RFLink/Plugins/Plugin_064.c @@ -23,19 +23,27 @@ #define ATLANTIC_PLUGIN_ID 064 #define PLUGIN_DESC_064 "Atlantic" #define ATLANTIC_PULSECOUNT 74 +#define ATLANTIC_PULSECOUNT_TOO_SHORT_BREAK 223 #define ATLANTIC_PULSE_MID 600 / RAWSIGNAL_SAMPLE_RATE #define ATLANTIC_PULSE_MIN 300 / RAWSIGNAL_SAMPLE_RATE #define ATLANTIC_PULSE_MAX 900 / RAWSIGNAL_SAMPLE_RATE +#define ATLANTIC_TOO_SHORT_BREAK_MIN_LENGTH 2500 / RAWSIGNAL_SAMPLE_RATE + #ifdef PLUGIN_064 #include "../4_Display.h" boolean Plugin_064(byte function, const char *string) { - if (RawSignal.Number != ATLANTIC_PULSECOUNT) + if (RawSignal.Number != ATLANTIC_PULSECOUNT && RawSignal.Number != ATLANTIC_PULSECOUNT_TOO_SHORT_BREAK) return false; + if(RawSignal.Number == ATLANTIC_PULSECOUNT_TOO_SHORT_BREAK) { + if( RawSignal.Pulses[75] < ATLANTIC_TOO_SHORT_BREAK_MIN_LENGTH ) + return false; + } + unsigned long bitstream = 0L; // Only the 32 first bits are processed //==================================================================================