diff --git a/src/modules/SX128x/SX128x.cpp b/src/modules/SX128x/SX128x.cpp index 1279b571..6ef2b4bf 100644 --- a/src/modules/SX128x/SX128x.cpp +++ b/src/modules/SX128x/SX128x.cpp @@ -690,7 +690,7 @@ int16_t SX128x::startChannelScan() { return(this->startChannelScan(config)); } -int16_t SX128x::startChannelScan(ChannelScanConfig_t config) { +int16_t SX128x::startChannelScan(const ChannelScanConfig_t &config) { // check active modem if(getPacketType() != RADIOLIB_SX128X_PACKET_TYPE_LORA) { return(RADIOLIB_ERR_WRONG_MODEM); diff --git a/src/modules/SX128x/SX128x.h b/src/modules/SX128x/SX128x.h index 03d87e68..1e1dea1f 100644 --- a/src/modules/SX128x/SX128x.h +++ b/src/modules/SX128x/SX128x.h @@ -616,7 +616,7 @@ class SX128x: public PhysicalLayer { \param config CAD configuration structure. \returns \ref status_codes */ - int16_t startChannelScan(ChannelScanConfig_t config) override; + int16_t startChannelScan(const ChannelScanConfig_t &config) override; /*! \brief Read the channel scan result