Closed alexanderplin closed 7 years ago
Confirmed - this change worked for me too.
Using an Adafruit Huzzah Feather with the OLED Featherwing the IP address obtained from WiFi.localIP() (via ESP8266WiFi.h) displayed in reverse order when passed to setIPAddress(ip).
Changing Adafruit_FeatherOLED_WiFi.cpp as described by alin96 meant the IP addresses displayed correctly.
I can confirm the issue is also there an the ARM platform, specifically Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500 using WiFi101 library.
I applied the correction above to my local library and can confirm it works for my platform as well.
FWIW here are my versions:
On the board we see the IP address reversed. I am guessing this has something to do with the class IPAddress representing IP in Big-Endian, however I believe the Arduino and Adafruit Feather HUZZAH ESP8266 are Little-Endian. In the original library on this repo in Adafruit_FeatherOLED_WiFi.cpp:
This is the correct representation for Big-Endian, but not for Little-Endian. I changed this portion of the code in my local library to:
and now the IP displays correctly on my OLED display. Perhaps this should be changed for the library as well?