From fa1760d0b1ee77a73ae6c9b250caa0efea4fd017 Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 28 Aug 2024 19:36:12 +0200 Subject: [PATCH] [SX126x] Pass scan config by const reference --- src/modules/SX126x/SX126x.cpp | 2 +- src/modules/SX126x/SX126x.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/SX126x/SX126x.cpp b/src/modules/SX126x/SX126x.cpp index ca8648b5..a4e761ff 100644 --- a/src/modules/SX126x/SX126x.cpp +++ b/src/modules/SX126x/SX126x.cpp @@ -766,7 +766,7 @@ int16_t SX126x::startChannelScan() { return(this->startChannelScan(config)); } -int16_t SX126x::startChannelScan(ChannelScanConfig_t config) { +int16_t SX126x::startChannelScan(const ChannelScanConfig_t &config) { // check active modem if(getPacketType() != RADIOLIB_SX126X_PACKET_TYPE_LORA) { return(RADIOLIB_ERR_WRONG_MODEM); diff --git a/src/modules/SX126x/SX126x.h b/src/modules/SX126x/SX126x.h index 4404faa0..143a25e0 100644 --- a/src/modules/SX126x/SX126x.h +++ b/src/modules/SX126x/SX126x.h @@ -714,7 +714,7 @@ class SX126x: 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