From 1357d672c74c9bb7ce7c009b0a08d0076c49c188 Mon Sep 17 00:00:00 2001 From: jgromes Date: Sat, 18 Jan 2025 17:49:24 +0100 Subject: [PATCH] [Hell] Cppcheck fixes --- src/protocols/Hellschreiber/Hellschreiber.cpp | 3 ++- src/protocols/Hellschreiber/Hellschreiber.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/protocols/Hellschreiber/Hellschreiber.cpp b/src/protocols/Hellschreiber/Hellschreiber.cpp index 749b924e..907aab7c 100644 --- a/src/protocols/Hellschreiber/Hellschreiber.cpp +++ b/src/protocols/Hellschreiber/Hellschreiber.cpp @@ -73,7 +73,8 @@ size_t HellClient::write(uint8_t b) { uint8_t buff[RADIOLIB_HELL_FONT_WIDTH]; buff[0] = 0x00; for(uint8_t i = 0; i < RADIOLIB_HELL_FONT_WIDTH - 2; i++) { - buff[i + 1] = RADIOLIB_NONVOLATILE_READ_BYTE(&HellFont[pos][i]); + uint8_t* ptr = const_cast(&HellFont[pos][i]); + buff[i + 1] = RADIOLIB_NONVOLATILE_READ_BYTE(ptr); } buff[RADIOLIB_HELL_FONT_WIDTH - 1] = 0x00; diff --git a/src/protocols/Hellschreiber/Hellschreiber.h b/src/protocols/Hellschreiber/Hellschreiber.h index 0c266979..ff78fd1b 100644 --- a/src/protocols/Hellschreiber/Hellschreiber.h +++ b/src/protocols/Hellschreiber/Hellschreiber.h @@ -144,8 +144,8 @@ class HellClient: public RadioLibPrint { uint32_t pixelDuration = 0; bool invert = false; - size_t printNumber(unsigned long, uint8_t); - size_t printFloat(double, uint8_t); + size_t printNumber(unsigned long, uint8_t) override; + size_t printFloat(double, uint8_t) override; int16_t transmitDirect(uint32_t freq = 0, uint32_t freqHz = 0); int16_t standby();