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;