kopia lustrzana https://github.com/jgromes/RadioLib
[CC1101] Fix `setPromiscuousMode(false)` bug
Signed-off-by: Federico Maggi <federico.maggi@gmail.com>pull/627/head
rodzic
894e912252
commit
09669eeb26
|
@ -824,14 +824,21 @@ int16_t CC1101::setPromiscuousMode(bool promiscuous) {
|
|||
}
|
||||
|
||||
if (promiscuous == true) {
|
||||
// disable preamble and sync word filtering and insertion
|
||||
// disable preamble detection and generation
|
||||
state = setPreambleLength(0);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// disable sync word filtering and insertion
|
||||
state = disableSyncWordFiltering();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// disable CRC filtering
|
||||
state = setCrcFiltering(false);
|
||||
} else {
|
||||
// enable preamble and sync word filtering and insertion
|
||||
state = setPreambleLength(RADIOLIB_CC1101_DEFAULT_PREAMBLELEN);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// enable sync word filtering and insertion
|
||||
state = enableSyncWordFiltering();
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue