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
This commit is contained in:
Sébastien Millet 2022-01-16 09:34:06 +01:00
parent faef869755
commit 84cb6a6132
3 changed files with 36 additions and 2 deletions

View File

@ -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);
```

View File

@ -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

View File

@ -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;