[SX126x] Added default channel scan override

This commit is contained in:
jgromes 2023-08-06 16:07:28 +02:00
parent f589d77e09
commit 86724197ec
2 changed files with 11 additions and 1 deletions

View file

@ -429,6 +429,10 @@ int16_t SX126x::packetMode() {
return(state);
}
int16_t SX126x::scanChannel() {
return(this->scanChannel(RADIOLIB_SX126X_CAD_PARAM_DEFAULT, RADIOLIB_SX126X_CAD_PARAM_DEFAULT, RADIOLIB_SX126X_CAD_PARAM_DEFAULT));
}
int16_t SX126x::scanChannel(uint8_t symbolNum, uint8_t detPeak, uint8_t detMin) {
// set mode to CAD
int state = startChannelScan(symbolNum, detPeak, detMin);

View file

@ -528,6 +528,12 @@ class SX126x: public PhysicalLayer {
*/
int16_t receiveDirect() override;
/*!
\brief Performs scan for LoRa transmission in the current channel. Detects both preamble and payload.
\returns \ref status_codes
*/
int16_t scanChannel() override;
/*!
\brief Performs scan for LoRa transmission in the current channel. Detects both preamble and payload.
\param symbolNum Number of symbols for CAD detection. Defaults to the value recommended by AN1200.48.
@ -535,7 +541,7 @@ class SX126x: public PhysicalLayer {
\param detMin Minimum value for CAD detection. Defaults to the value recommended by AN1200.48.
\returns \ref status_codes
*/
int16_t scanChannel(uint8_t symbolNum = RADIOLIB_SX126X_CAD_PARAM_DEFAULT, uint8_t detPeak = RADIOLIB_SX126X_CAD_PARAM_DEFAULT, uint8_t detMin = RADIOLIB_SX126X_CAD_PARAM_DEFAULT);
int16_t scanChannel(uint8_t symbolNum, uint8_t detPeak, uint8_t detMin);
/*!
\brief Sets the module to sleep mode. To wake the device up, call standby().