Merge branch 'master' of https://github.com/jgromes/RadioLib
This commit is contained in:
commit
a391318477
3 changed files with 21 additions and 1 deletions
|
@ -852,7 +852,7 @@ class CC1101: public PhysicalLayer {
|
|||
/*!
|
||||
\brief Enable CRC filtering and generation.
|
||||
|
||||
\param crcOn Set or unset promiscuous mode.
|
||||
\param crcOn Set or unset CRC generation and filtering.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
|
|
|
@ -1045,6 +1045,16 @@ int16_t SX127x::variablePacketLengthMode(uint8_t maxLen) {
|
|||
return(SX127x::setPacketMode(RADIOLIB_SX127X_PACKET_VARIABLE, maxLen));
|
||||
}
|
||||
|
||||
int16_t SX127x::setCrcFiltering(bool crcOn) {
|
||||
_crcOn = crcOn;
|
||||
|
||||
if (crcOn == true) {
|
||||
return(_mod->SPIsetRegValue(RADIOLIB_SX127X_REG_PACKET_CONFIG_1, RADIOLIB_SX127X_CRC_ON, 4, 4));
|
||||
} else {
|
||||
return(_mod->SPIsetRegValue(RADIOLIB_SX127X_REG_PACKET_CONFIG_1, RADIOLIB_SX127X_CRC_OFF, 4, 4));
|
||||
}
|
||||
}
|
||||
|
||||
int16_t SX127x::setRSSIConfig(uint8_t smoothingSamples, int8_t offset) {
|
||||
// check active modem
|
||||
if(getActiveModem() != RADIOLIB_SX127X_FSK_OOK) {
|
||||
|
|
|
@ -980,6 +980,15 @@ class SX127x: public PhysicalLayer {
|
|||
*/
|
||||
int16_t variablePacketLengthMode(uint8_t maxLen = RADIOLIB_SX127X_MAX_PACKET_LENGTH_FSK);
|
||||
|
||||
/*!
|
||||
\brief Enable CRC filtering and generation.
|
||||
|
||||
\param crcOn Set or unset CRC filtering and generation.
|
||||
|
||||
\returns \ref status_codes
|
||||
*/
|
||||
int16_t setCrcFiltering(bool crcOn = true);
|
||||
|
||||
/*!
|
||||
\brief Sets RSSI measurement configuration in FSK mode.
|
||||
|
||||
|
@ -1117,6 +1126,7 @@ class SX127x: public PhysicalLayer {
|
|||
float _br = 0;
|
||||
bool _ook = false;
|
||||
bool _crcEnabled = false;
|
||||
bool _crcOn = true; // default value used in FSK mode
|
||||
size_t _packetLength = 0;
|
||||
|
||||
int16_t setFrequencyRaw(float newFreq);
|
||||
|
|
Loading…
Add table
Reference in a new issue