From 84a11b2f90db6a4261bbe2d4679bc49ea7295d59 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Sat, 1 Feb 2025 10:52:00 +0300 Subject: [PATCH] [LR11XX] Add missing override specifiers --- src/modules/LR11x0/LR1110.h | 4 ++-- src/modules/LR11x0/LR1120.h | 4 ++-- src/protocols/PhysicalLayer/PhysicalLayer.cpp | 13 +++++++++++++ src/protocols/PhysicalLayer/PhysicalLayer.h | 2 ++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/modules/LR11x0/LR1110.h b/src/modules/LR11x0/LR1110.h index b2038859..d53e7979 100644 --- a/src/modules/LR11x0/LR1110.h +++ b/src/modules/LR11x0/LR1110.h @@ -105,7 +105,7 @@ class LR1110: public LR11x0 { based on configured output power, preferring the low-power PA. If set to true, only high-power PA will be used. \returns \ref status_codes */ - int16_t setOutputPower(int8_t power, bool forceHighPower); + int16_t setOutputPower(int8_t power, bool forceHighPower) override; /*! \brief Check if output power is configurable. @@ -124,7 +124,7 @@ class LR1110: public LR11x0 { based on configured output power, preferring the low-power PA. If set to true, only high-power PA will be used. \returns \ref status_codes */ - int16_t checkOutputPower(int8_t power, int8_t* clipped, bool forceHighPower); + int16_t checkOutputPower(int8_t power, int8_t* clipped, bool forceHighPower) override; /*! \brief Set modem for the radio to use. Will perform full reset and reconfigure the radio diff --git a/src/modules/LR11x0/LR1120.h b/src/modules/LR11x0/LR1120.h index 3c532ebd..149ed662 100644 --- a/src/modules/LR11x0/LR1120.h +++ b/src/modules/LR11x0/LR1120.h @@ -114,7 +114,7 @@ class LR1120: public LR11x0 { Ignored when operating in 2.4 GHz band. \returns \ref status_codes */ - int16_t setOutputPower(int8_t power, bool forceHighPower); + int16_t setOutputPower(int8_t power, bool forceHighPower) override; /*! \brief Check if output power is configurable. @@ -134,7 +134,7 @@ class LR1120: public LR11x0 { Ignored when operating in 2.4 GHz band. \returns \ref status_codes */ - int16_t checkOutputPower(int8_t power, int8_t* clipped, bool forceHighPower); + int16_t checkOutputPower(int8_t power, int8_t* clipped, bool forceHighPower) override; /*! \brief Set modem for the radio to use. Will perform full reset and reconfigure the radio diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.cpp b/src/protocols/PhysicalLayer/PhysicalLayer.cpp index 3bf447ee..ab6dab4b 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.cpp +++ b/src/protocols/PhysicalLayer/PhysicalLayer.cpp @@ -253,12 +253,25 @@ int16_t PhysicalLayer::setOutputPower(int8_t power) { return(RADIOLIB_ERR_UNSUPPORTED); } +int16_t PhysicalLayer::setOutputPower(int8_t power, bool forceHighPower) { + (void)power; + (void)forceHighPower; + return(RADIOLIB_ERR_UNSUPPORTED); +} + int16_t PhysicalLayer::checkOutputPower(int8_t power, int8_t* clipped) { (void)power; (void)clipped; return(RADIOLIB_ERR_UNSUPPORTED); } +int16_t PhysicalLayer::checkOutputPower(int8_t power, int8_t* clipped, bool forceHighPower) { + (void)power; + (void)clipped; + (void)forceHighPower; + return(RADIOLIB_ERR_UNSUPPORTED); +} + int16_t PhysicalLayer::setSyncWord(uint8_t* sync, size_t len) { (void)sync; (void)len; diff --git a/src/protocols/PhysicalLayer/PhysicalLayer.h b/src/protocols/PhysicalLayer/PhysicalLayer.h index a8f66ce1..7f44d3f4 100644 --- a/src/protocols/PhysicalLayer/PhysicalLayer.h +++ b/src/protocols/PhysicalLayer/PhysicalLayer.h @@ -372,6 +372,7 @@ class PhysicalLayer { \returns \ref status_codes */ virtual int16_t setOutputPower(int8_t power); + virtual int16_t setOutputPower(int8_t power, bool forceHighPower); /*! \brief Check if output power is configurable. Must be implemented in module class if the module supports it. @@ -380,6 +381,7 @@ class PhysicalLayer { \returns \ref status_codes */ virtual int16_t checkOutputPower(int8_t power, int8_t* clipped); + virtual int16_t checkOutputPower(int8_t power, int8_t* clipped, bool forceHighPower); /*! \brief Set sync word. Must be implemented in module class if the module supports it.