arduino-libraries / ArduinoMqttClient

ArduinoMqttClient Library for Arduino
GNU Lesser General Public License v2.1
192 stars 75 forks source link

Fix some warnings and wrap ESP8266 Client overrides in #ifdef #22

Closed sandeepmistry closed 4 years ago

sandeepmistry commented 4 years ago

Based on the discussions in:

@lxrobotics for @jandrassy's concerns, to reproduce, use the WiFiEcho.ino and change:

const char broker[] = "test.mosquitto.org";

to

IPAddress broker = IPAddress(10, 0, 1, 1);

You will get a compile error.

JAndrassy commented 4 years ago

the invalid pure virtual functions were only in esp8266 core 2.5.0. they were reverted in 2.5.1 in May, current version of esp8266 core is 2.6.1

sandeepmistry commented 4 years ago

@jandrassy is there some way to determine the core version at compile time?

JAndrassy commented 4 years ago

@jandrassy is there some way to determine the core version at compile time?

why is the compatibility with broken 2.5.0 important?

sandeepmistry commented 4 years ago

why is the compatibility with broken 2.5.0 important?

@jandrassy I'm not sure, there is only a comment from @lxrobotics: https://github.com/arduino-libraries/ArduinoMqttClient/commit/ade2940a2ffe1cdc04e39d638d28378cc2c41c32#commitcomment-35808711 that Create needs it.

@lxrobotics and/or @eclipse1985 could you please explain?

eclipse1985 commented 4 years ago

We have to keep the compatibility with 2.5.0 because on create we are locked at this version. Versions >2.5 have totally changed the build/upload tools, and we are unable to port them on create agent right now.

JAndrassy commented 4 years ago

We have to keep the compatibility with 2.5.0 because on create we are locked at this version. Versions >2.5 have totally changed the build/upload tools, and we are unable to port them on create agent right now.

esp8266 core 2.4.2 is a very good version. 2.5.0 updated to Espressif SDK 3.0 beta and it doesn't work good. they reverted to SDK 2.2.x in 2.5.1

aentinger commented 4 years ago

@jandrassy Thank you for letting us know. I suppose the virtual function declarations causing this change are still defined in ESP8266 Core 2.4.2 Client class?

JAndrassy commented 4 years ago

@jandrassy Thank you for letting us know. I suppose the virtual function declarations causing this change are still defined in ESP8266 Core 2.4.2 Client class?

they are not. Only 2.5.0 is wrong.

aentinger commented 4 years ago

@eclipse1985 How about downgrading to 2.4.2 then?

eclipse1985 commented 4 years ago

I'm not sure this is feasible on create side cc @rsora @matteosuppo