From 84cb6a613258f56d2c5a0df17e6d3e285384d8e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Millet?= Date: Sun, 16 Jan 2022 09:34:06 +0100 Subject: [PATCH] Updates bare minimum initseq to 2000 us - Previous value was 4000 us (4000 microseconds). This was too short to identify certain RCSwitch protocols (like protocol 7). - Also a few minor updates in README and example code --- README.md | 34 +++++++++++++++++++ RF433any.h | 2 +- .../03_output-signal-timings.ino | 2 +- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ab5e5e9..392fda0 100644 --- a/README.md +++ b/README.md @@ -132,3 +132,37 @@ This is the goal of You can copy-paste the output of `01_main.ino` to call RF433recv library. + +About 'false positives' +----------------------- + +Since RF433any is struggling to identify a coding sequence from any kind of +signal, it is prone to identifying codes from what is noise. + +There are two ways to mitigate it: + +- Use get_nb_bits() (see example `01_main.ino`) and ignore any signal below a +certain threshold. Note RF433any has a hard-coded limit of 7 bits of coding. + +- Use strictness of signal analyzis. That is, when creating the Track object, +use the second parameter. + +Default Track construction: + +```c++ + Track track(PIN_RFINPUT); +``` + +This is equivalent to: + +```c++ + Track track(PIN_RFINPUT, RAIL_MOOD_LAXIST); +``` + +If you are tired of fake receptions of actually non-coding signal, you can +instead execute: + +```c++ + Track track(PIN_RFINPUT, RAIL_MOOD_STRICT); +``` + diff --git a/RF433any.h b/RF433any.h index bc4033e..fe707b5 100644 --- a/RF433any.h +++ b/RF433any.h @@ -576,7 +576,7 @@ class DecoderManchester: public Decoder { // * Track ******************************************************************** // * ***** ******************************************************************** -#define TRACK_MIN_INITSEQ_DURATION 4000 +#define TRACK_MIN_INITSEQ_DURATION 2000 #define TRACK_MIN_BITS 7 // IMPORTANT diff --git a/examples/03_output-signal-timings/03_output-signal-timings.ino b/examples/03_output-signal-timings/03_output-signal-timings.ino index 70fec68..e443c36 100644 --- a/examples/03_output-signal-timings/03_output-signal-timings.ino +++ b/examples/03_output-signal-timings/03_output-signal-timings.ino @@ -75,7 +75,7 @@ void setup() { free(buf); } -Track track(PIN_RFINPUT); +Track track(PIN_RFINPUT, RAIL_MOOD_STRICT); void output_timings(Decoder *pdec) { TimingsExt tsext;