ph1p / ikea-led-obegraensad

ESP32/Arduino hack for the ikea OBEGRÄNSAD led wall lamp
MIT License
578 stars 78 forks source link

fix: compile errors when using WiFiManager.h on ESP8266 #80

Closed ahuber21 closed 3 months ago

ahuber21 commented 6 months ago

Hi @ph1p I figured out a way to fix the build errors when using WiFiManager on ESP8266. I don't have a device at hand right now, so I couldn't test it.

ph1p commented 6 months ago

So it's correct, that you revert your PR https://github.com/ph1p/ikea-led-obegraensad/pull/59 ?

ahuber21 commented 6 months ago

Not at all. #59 was limited to ESP32 and for ESP8266 we kept the "legacy" way of connecting to WiFi. I've solved the compile errors on ESP8266, so we can start using WiFiManager there as well. Looking at the changes again, I realize I should add another commit with an updated README.

ph1p commented 6 months ago

But this PR removes your previous code. So you have to check if its ESP32 or ESP8266. This repository does not have branches for every board. The code should work for both and handle it via #define ....

ahuber21 commented 6 months ago

No it consolidates my code. Previously, we had two versions of connectToWifi(), one defined for ESP32, one for ESP8266. Now we only have one. That's why the diff is so large. Please check the entire file here: https://github.com/ph1p/ikea-led-obegraensad/blob/a875e5cdeb9cc76f498b6aecf333e1235b065577/src/main.cpp#L52-L77

Am I missing something?