Skip to content

Commit

Permalink
Fix for Atlantic devices which have too short break between messages
Browse files Browse the repository at this point in the history
3800us
  • Loading branch information
cpainchaud committed Mar 3, 2021
1 parent eb5ec0e commit 56e8c47
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion RFLink/Plugins/Plugin_064.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

//==================================================================================
Expand Down

0 comments on commit 56e8c47

Please sign in to comment.