From dfaa378742f9470d7740960f5adb6ee9303be960 Mon Sep 17 00:00:00 2001 From: Jens B Date: Sat, 12 Aug 2023 22:39:14 +0200 Subject: [PATCH] fixed compiler warnings (ICACHE_RAM_ATTR deprecated, catch polymorphic type by value) --- src/esp8266-intexsbh20/PureSpaIO.cpp | 8 ++++---- src/esp8266-intexsbh20/PureSpaIO.h | 10 +++++----- src/esp8266-intexsbh20/common.h | 2 +- src/esp8266-intexsbh20/esp8266-intexsbh20.ino | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/esp8266-intexsbh20/PureSpaIO.cpp b/src/esp8266-intexsbh20/PureSpaIO.cpp index 6031c9d..fa0ee32 100644 --- a/src/esp8266-intexsbh20/PureSpaIO.cpp +++ b/src/esp8266-intexsbh20/PureSpaIO.cpp @@ -786,7 +786,7 @@ int PureSpaIO::convertDisplayToCelsius(uint32 value) const return (celsiusValue >= 0) && (celsiusValue <= 60) ? celsiusValue : UNDEF::INT; } -ICACHE_RAM_ATTR void PureSpaIO::clockRisingISR(void* arg) +IRAM_ATTR void PureSpaIO::clockRisingISR(void* arg) { bool data = !digitalRead(PIN::DATA); bool enabled = !digitalRead(PIN::LATCH); @@ -839,7 +839,7 @@ ICACHE_RAM_ATTR void PureSpaIO::clockRisingISR(void* arg) } } -ICACHE_RAM_ATTR inline void PureSpaIO::decodeDisplay() +IRAM_ATTR inline void PureSpaIO::decodeDisplay() { char digit; switch (isrState.frameValue & FRAME_DIGIT::SEGMENTS) @@ -1153,7 +1153,7 @@ ICACHE_RAM_ATTR inline void PureSpaIO::decodeLED() } } -ICACHE_RAM_ATTR inline void PureSpaIO::updateButtonState(volatile unsigned int& buttonPressCount) +IRAM_ATTR inline void PureSpaIO::updateButtonState(volatile unsigned int& buttonPressCount) { if (buttonPressCount) { @@ -1169,7 +1169,7 @@ ICACHE_RAM_ATTR inline void PureSpaIO::updateButtonState(volatile unsigned int& } } -ICACHE_RAM_ATTR inline void PureSpaIO::decodeButton() +IRAM_ATTR inline void PureSpaIO::decodeButton() { if (isrState.frameValue & FRAME_BUTTON::FILTER) { diff --git a/src/esp8266-intexsbh20/PureSpaIO.h b/src/esp8266-intexsbh20/PureSpaIO.h index 82f8b6c..893b927 100644 --- a/src/esp8266-intexsbh20/PureSpaIO.h +++ b/src/esp8266-intexsbh20/PureSpaIO.h @@ -305,11 +305,11 @@ class PureSpaIO private: // ISR and ISR helper - static ICACHE_RAM_ATTR void clockRisingISR(void* arg); - static ICACHE_RAM_ATTR inline void decodeDisplay(); - static ICACHE_RAM_ATTR inline void decodeLED(); - static ICACHE_RAM_ATTR inline void decodeButton(); - static ICACHE_RAM_ATTR inline void updateButtonState(volatile unsigned int& buttonPressCount); + static IRAM_ATTR void clockRisingISR(void* arg); + static IRAM_ATTR inline void decodeDisplay(); + static IRAM_ATTR inline void decodeLED(); + static IRAM_ATTR inline void decodeButton(); + static IRAM_ATTR inline void updateButtonState(volatile unsigned int& buttonPressCount); private: // ISR variables diff --git a/src/esp8266-intexsbh20/common.h b/src/esp8266-intexsbh20/common.h index 8e310b8..7df77a0 100644 --- a/src/esp8266-intexsbh20/common.h +++ b/src/esp8266-intexsbh20/common.h @@ -52,7 +52,7 @@ namespace CONFIG { - const char WIFI_VERSION[] = "1.0.7.1"; // 12.08.2023 + const char WIFI_VERSION[] = "1.0.7.2"; // 12.08.2023 // WiFi parameters const unsigned long WIFI_MAX_DISCONNECT_DURATION = 900000; // [ms] 5 min until reboot diff --git a/src/esp8266-intexsbh20/esp8266-intexsbh20.ino b/src/esp8266-intexsbh20/esp8266-intexsbh20.ino index 693204f..11986dc 100644 --- a/src/esp8266-intexsbh20/esp8266-intexsbh20.ino +++ b/src/esp8266-intexsbh20/esp8266-intexsbh20.ino @@ -152,7 +152,7 @@ void setup() ready = true; } - catch (std::runtime_error re) + catch (const std::runtime_error& re) { Serial.println(re.what()); }