[CC1101] PQT = 0 in setPromiscuous (#1033)
* PQT = 0 in setPromiscuous * Carriersense in promiscuous * carriersense to promiscuous * Fix explanation
This commit is contained in:
parent
648b455cff
commit
b3ed84a035
2 changed files with 9 additions and 3 deletions
|
@ -826,7 +826,7 @@ int16_t CC1101::setCrcFiltering(bool enable) {
|
|||
}
|
||||
}
|
||||
|
||||
int16_t CC1101::setPromiscuousMode(bool enable) {
|
||||
int16_t CC1101::setPromiscuousMode(bool enable, bool requireCarrierSense) {
|
||||
int16_t state = RADIOLIB_ERR_NONE;
|
||||
|
||||
if(this->promiscuous == enable) {
|
||||
|
@ -834,9 +834,14 @@ int16_t CC1101::setPromiscuousMode(bool enable) {
|
|||
}
|
||||
|
||||
if(enable) {
|
||||
// Lets set PQT to 0 with Promiscuous too
|
||||
// We have to set the length to set PQT, but it should get disabled with disableSyncWordFiltering()
|
||||
state = setPreambleLength(16, 0);
|
||||
RADIOLIB_ASSERT(state);
|
||||
// disable sync word filtering and insertion
|
||||
// this also disables preamble
|
||||
state = disableSyncWordFiltering();
|
||||
// Can enable Sync Mode with carriersense when promiscuous is enabled. Default is false: Sync Mode None
|
||||
state = disableSyncWordFiltering(requireCarrierSense);
|
||||
RADIOLIB_ASSERT(state);
|
||||
|
||||
// disable CRC filtering
|
||||
|
|
|
@ -874,9 +874,10 @@ class CC1101: public PhysicalLayer {
|
|||
/*!
|
||||
\brief Set modem in "sniff" mode: no packet filtering (e.g., no preamble, sync word, address, CRC).
|
||||
\param enable Set or unset promiscuous mode.
|
||||
\param defaults to false: no carriersense, true: sets carriersense above threshold
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setPromiscuousMode(bool enable = true);
|
||||
int16_t setPromiscuousMode(bool enable = true, bool requireCarrierSense = false);
|
||||
|
||||
/*!
|
||||
\brief Get whether the modem is in promiscuous mode: no packet filtering
|
||||
|
|
Loading…
Add table
Reference in a new issue