From 914c616c2af560536b36f44be36feed82ff226a4 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 11 May 2024 20:32:20 +0100 Subject: [PATCH] [Bell] Fixed issues found by cppcheck --- src/protocols/BellModem/BellModem.cpp | 2 +- src/protocols/BellModem/BellModem.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/protocols/BellModem/BellModem.cpp b/src/protocols/BellModem/BellModem.cpp index a4c6f3e8..30da9372 100644 --- a/src/protocols/BellModem/BellModem.cpp +++ b/src/protocols/BellModem/BellModem.cpp @@ -58,7 +58,7 @@ size_t BellClient::write(uint8_t b) { uint16_t toneSpace = this->modemType.freqSpace; if(this->reply) { toneMark = this->modemType.freqMarkReply; - toneMark = this->modemType.freqSpaceReply; + toneSpace = this->modemType.freqSpaceReply; } // get the Module pointer to access HAL diff --git a/src/protocols/BellModem/BellModem.h b/src/protocols/BellModem/BellModem.h index 045c2feb..886e206e 100644 --- a/src/protocols/BellModem/BellModem.h +++ b/src/protocols/BellModem/BellModem.h @@ -75,7 +75,7 @@ class BellClient: public AFSKClient, public RadioLibPrint { \brief Audio-client constructor. Can be used when AFSKClient instance already exists. \param aud Audio client to use. */ - BellClient(AFSKClient* aud); + explicit BellClient(AFSKClient* aud); /*! \brief Initialization method. @@ -104,7 +104,7 @@ class BellClient: public AFSKClient, public RadioLibPrint { \param b Byte to write. \returns 1 if the byte was written, 0 otherwise. */ - size_t write(uint8_t b); + size_t write(uint8_t b) override; /*! \brief Set the modem to idle (ready to transmit). @@ -119,7 +119,7 @@ class BellClient: public AFSKClient, public RadioLibPrint { #if !RADIOLIB_GODMODE private: #endif - BellModem_t modemType; + BellModem_t modemType = Bell101; float correction = 1.0; uint16_t toneLen = 0; bool autoStart = true;