ximon / Hot-tub-remote

Lay-z-Spa wifi remote (3 pin model)
44 stars 7 forks source link

Issue with ESP8266 Arduino IDE board version 2.5.2 #1

Closed fhempy closed 4 years ago

fhempy commented 5 years ago

Hi,

can you please add ICACHE_RAM_ATTR before the 2 functions which are called by the interrupt handler.

ICACHE_RAM_ATTR void handleButtonPress() {
  sendTestCommand = true;
}

ICACHE_RAM_ATTR void handleDataInterrupt() {
  word data = receiveCommand();
  decodeCommand(data); 
  lastReceivedCommand = millis();
}

Otherwise it crashes on startup, see also https://github.com/esp8266/Arduino/issues/1734

Many thanks for your great work!

ximon commented 5 years ago

I've added these, still works with 2.4.2 and now compiles and runs with 2.5.2 also, will double check tonight if moving to 2.5.2 causes any issues.

ximon commented 4 years ago

Moving to 2.5.2 has uncovered some existing exception issues, I've rewritten the way data is read and written to completely avoid delays in the isr and use timers to check and clock the bits. Will commit after testing (tomorrow hopefully)

ximon commented 4 years ago

This issue is resolved