crankyoldgit / IRremoteESP8266

Infrared remote library for ESP8266/ESP32: send and receive infrared signals with multiple protocols. Based on: https://github.com/shirriff/Arduino-IRremote/
GNU Lesser General Public License v2.1
2.84k stars 810 forks source link

IRremoteESP8266 library compile error bk7231t #2059

Open DevineCZ opened 5 months ago

DevineCZ commented 5 months ago

Version/revision of the library used

2.8.6

Describe the bug

When I compile in ESPHome 2023.12.9 in Home Assistant IRremoteESP826, I get an error message.

Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRrecv.cpp.o Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRtext.cpp.o Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRtimer.cpp.o Compiling .pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRutils.cpp.o /piolibs/IRremoteESP8266/src/IRrecv.cpp:140:7: error: '_IRrecv' has not been declared 140 | using _IRrecv::timer; | ^~~ /piolibs/IRremoteESP8266/src/IRrecv.cpp:174:3: error: expected unqualified-id before 'if' 174 | if (params.rawlen) params.rcvstate = kStopState; | ^~ /piolibs/IRremoteESP8266/src/IRrecv.cpp:181:1: error: expected declaration before '}' token 181 | } | ^ /piolibs/IRremoteESP8266/src/IRrecv.cpp:184:27: error: expected initializer before 'gpio_intr' 184 | static void USE_IRAM_ATTR gpio_intr() { | ^~~~~ /piolibs/IRremoteESP8266/src/IRrecv.cpp: In member function 'void IRrecv::enableIRIn(bool)': /piolibs/IRremoteESP8266/src/IRrecv.cpp:389:35: error: 'gpio_intr' was not declared in this scope 389 | attachInterrupt(params.recvpin, gpio_intr, CHANGE); | ^~~~~ *** [.pioenvs/samsung-ac-remote-control/lib84c/IRremoteESP8266/IRrecv.cpp.o] Error 1

To Reproduce

In the ESPHome add-on in Home Assistant, try compiling the following:

esphome: name: samsung-ac-remote-control friendly_name: samsung-ac includes:



### I have followed the steps in the [Troubleshooting Guide](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Troubleshooting-Guide) & read the [FAQ](https://github.com/crankyoldgit/IRremoteESP8266/wiki/Frequently-Asked-Questions)
Yes

### Has this library/code previously worked as expected for you?
No.

### Other useful information

I found the same error here:

https://github.com/esphome/issues/issues/5432
crankyoldgit commented 5 months ago

Processing samsung-ac-remote-control (board: wb3s; framework: arduino; platform: libretiny @ 1.4.1)

I think your problem is you're trying to build for a platform that this library doesn't support. ie. wb3s is not an ESP8266 or a ESP32.

See the main README.md for this repository/project/library:

https://github.com/crankyoldgit/IRremoteESP8266/blob/f67948f6c8b156ff178b943af52bd4d3e0a94a6a/README.md?plain=1#L10-L11

nagyrobi commented 6 days ago

Fix in https://github.com/crankyoldgit/IRremoteESP8266/pull/2111