hardtechnology / efergy_v2

Efergy Energy Monitor Version 2
7 stars 2 forks source link

ArduinoJson version errors on compile #3

Closed mr-sneezy closed 3 years ago

mr-sneezy commented 3 years ago

Had a crack at compilation. Getting multiple errors about ArduinoJson versions. Apparently a library downgrade or code migration needed.

error: DynamicJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6
     DynamicJsonBuffer jsonBuffer;
steven-geo commented 3 years ago

Looks like you may have an old version of ArduinoJson library. This is compiled with version 5.8.0. I will take a look at upgrading to the 6.x versions in the future.

mr-sneezy commented 3 years ago

Had a look in the libraries folder. My version is "version=6.16.1".

steven-geo commented 3 years ago

Hi, Please pull the master branch again. I have just updated and it compiles with the newest ArduinoJson Library 6.18.3

mr-sneezy commented 3 years ago

Thanks that sorted it. Confirmed it compiles in Arduino 1.8.15.

Also compiled in 2.0.0-beta10, but had one warning, about a type issue in efergy.cpp

Will try it out connected on the E2 this week soon.

steven-geo commented 3 years ago

Can you let me know more about the type error? I compile without any errors on Arduino 1.8.15 as well, so must be a library update. Thanks

mr-sneezy commented 3 years ago

I re-ran the 2.0.0-beta10 compiler tonight and the warning error has not repeated. I guess a shut down restart on the PC has sorted out something...