From d5987ac22e96781309287d26b08067a3ba2b495b Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 28 Aug 2024 19:36:21 +0200 Subject: [PATCH] [SX128x] Pass scan config by const reference --- src/modules/SX128x/SX128x.cpp | 2 +- src/modules/SX128x/SX128x.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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