From c62bb74f9d3f2ed9e231093664e3653f071b1ffb Mon Sep 17 00:00:00 2001 From: jgromes Date: Sun, 23 Apr 2023 19:40:56 +0200 Subject: [PATCH] [CC1101] Fixed shadowed variable name --- src/modules/CC1101/CC1101.cpp | 8 ++++---- src/modules/CC1101/CC1101.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/CC1101/CC1101.cpp b/src/modules/CC1101/CC1101.cpp index 242c5003..d12251bd 100644 --- a/src/modules/CC1101/CC1101.cpp +++ b/src/modules/CC1101/CC1101.cpp @@ -498,7 +498,7 @@ int16_t CC1101::setFrequency(float freq) { state |= SPIsetRegValue(RADIOLIB_CC1101_REG_FREQ0, FRF & 0x0000FF, 7, 0); if(state == RADIOLIB_ERR_NONE) { - this->freq = freq; + this->frequency = freq; } // Update the TX power accordingly to new freq. (PA values depend on chosen freq) @@ -601,13 +601,13 @@ int16_t CC1101::getFrequencyDeviation(float *freqDev) { int16_t CC1101::setOutputPower(int8_t power) { // round to the known frequency settings uint8_t f; - if(this->freq < 374.0) { + if(this->frequency < 374.0) { // 315 MHz f = 0; - } else if(this->freq < 650.5) { + } else if(this->frequency < 650.5) { // 434 MHz f = 1; - } else if(this->freq < 891.5) { + } else if(this->frequency < 891.5) { // 868 MHz f = 2; } else { diff --git a/src/modules/CC1101/CC1101.h b/src/modules/CC1101/CC1101.h index 1080ce19..7654173b 100644 --- a/src/modules/CC1101/CC1101.h +++ b/src/modules/CC1101/CC1101.h @@ -940,7 +940,7 @@ class CC1101: public PhysicalLayer { protected: #endif - float freq = RADIOLIB_CC1101_DEFAULT_FREQ; + float frequency = RADIOLIB_CC1101_DEFAULT_FREQ; float bitRate = RADIOLIB_CC1101_DEFAULT_BR; uint8_t rawRSSI = 0; uint8_t rawLQI = 0;