diff --git a/src/modules/LR11x0/LR11x0.cpp b/src/modules/LR11x0/LR11x0.cpp index 38d3298c..80a3c008 100644 --- a/src/modules/LR11x0/LR11x0.cpp +++ b/src/modules/LR11x0/LR11x0.cpp @@ -302,7 +302,7 @@ int16_t LR11x0::scanChannel() { return(this->scanChannel(config)); } -int16_t LR11x0::scanChannel(ChannelScanConfig_t config) { +int16_t LR11x0::scanChannel(const ChannelScanConfig_t &config) { // set mode to CAD int state = startChannelScan(config); RADIOLIB_ASSERT(state); diff --git a/src/modules/LR11x0/LR11x0.h b/src/modules/LR11x0/LR11x0.h index 43cefde3..e5a7baf6 100644 --- a/src/modules/LR11x0/LR11x0.h +++ b/src/modules/LR11x0/LR11x0.h @@ -847,7 +847,7 @@ class LR11x0: public PhysicalLayer { \param config CAD configuration structure. \returns \ref status_codes */ - int16_t scanChannel(ChannelScanConfig_t config) override; + int16_t scanChannel(const ChannelScanConfig_t &config) override; /*! \brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator). diff --git a/src/modules/SX126x/SX126x.cpp b/src/modules/SX126x/SX126x.cpp index 840b9f2d..f94481a0 100644 --- a/src/modules/SX126x/SX126x.cpp +++ b/src/modules/SX126x/SX126x.cpp @@ -449,7 +449,7 @@ int16_t SX126x::scanChannel() { return(this->scanChannel(config)); } -int16_t SX126x::scanChannel(ChannelScanConfig_t config) { +int16_t SX126x::scanChannel(const ChannelScanConfig_t &config) { // set mode to CAD int state = startChannelScan(config); RADIOLIB_ASSERT(state); diff --git a/src/modules/SX126x/SX126x.h b/src/modules/SX126x/SX126x.h index 143a25e0..521921da 100644 --- a/src/modules/SX126x/SX126x.h +++ b/src/modules/SX126x/SX126x.h @@ -542,7 +542,7 @@ class SX126x: public PhysicalLayer { \param config CAD configuration structure. \returns \ref status_codes */ - int16_t scanChannel(ChannelScanConfig_t config) override; + int16_t scanChannel(const ChannelScanConfig_t &config) override; /*! \brief Sets the module to sleep mode. To wake the device up, call standby(). diff --git a/src/modules/SX128x/SX128x.cpp b/src/modules/SX128x/SX128x.cpp index 250445a3..8fc395bf 100644 --- a/src/modules/SX128x/SX128x.cpp +++ b/src/modules/SX128x/SX128x.cpp @@ -435,7 +435,7 @@ int16_t SX128x::scanChannel() { return(this->scanChannel(config)); } -int16_t SX128x::scanChannel(ChannelScanConfig_t config) { +int16_t SX128x::scanChannel(const ChannelScanConfig_t &config) { // set mode to CAD int16_t state = startChannelScan(config); RADIOLIB_ASSERT(state); diff --git a/src/modules/SX128x/SX128x.h b/src/modules/SX128x/SX128x.h index 1e1dea1f..eab6eafc 100644 --- a/src/modules/SX128x/SX128x.h +++ b/src/modules/SX128x/SX128x.h @@ -462,7 +462,7 @@ class SX128x: public PhysicalLayer { \param config CAD configuration structure. \returns \ref status_codes */ - int16_t scanChannel(ChannelScanConfig_t config) override; + int16_t scanChannel(const ChannelScanConfig_t &config) override; /*! \brief Sets the module to sleep mode. To wake the device up, call standby(). diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.cpp b/src/protocols/PhysicalLayer/PhysicalLayer.cpp index 1a2c19f9..5176073c 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.cpp +++ b/src/protocols/PhysicalLayer/PhysicalLayer.cpp @@ -369,7 +369,7 @@ int16_t PhysicalLayer::scanChannel() { return(RADIOLIB_ERR_UNSUPPORTED); } -int16_t PhysicalLayer::scanChannel(ChannelScanConfig_t config) { +int16_t PhysicalLayer::scanChannel(const ChannelScanConfig_t &config) { (void)config; return(RADIOLIB_ERR_UNSUPPORTED); } diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.h b/src/protocols/PhysicalLayer/PhysicalLayer.h index 3151b616..aa8fc710 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.h +++ b/src/protocols/PhysicalLayer/PhysicalLayer.h @@ -513,7 +513,7 @@ class PhysicalLayer { \returns RADIOLIB_CHANNEL_FREE when channel is free, RADIOLIB_PREAMBLE_DETECTEDwhen occupied or other \ref status_codes. */ - virtual int16_t scanChannel(ChannelScanConfig_t config); + virtual int16_t scanChannel(const ChannelScanConfig_t &config); /*! \brief Get truly random number in range 0 - max.