Skip to content

Commit

Permalink
fixed compiler warnings (ICACHE_RAM_ATTR deprecated, catch polymorphi…
Browse files Browse the repository at this point in the history
…c type by value)
  • Loading branch information
jnsbyr committed Aug 12, 2023
1 parent d1c401f commit dfaa378
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions src/esp8266-intexsbh20/PureSpaIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
{
Expand Down
10 changes: 5 additions & 5 deletions src/esp8266-intexsbh20/PureSpaIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/esp8266-intexsbh20/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/esp8266-intexsbh20/esp8266-intexsbh20.ino
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ void setup()

ready = true;
}
catch (std::runtime_error re)
catch (const std::runtime_error& re)
{
Serial.println(re.what());
}
Expand Down

0 comments on commit dfaa378

Please sign in to comment.