-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arduino compile error #6
Comments
This error seems related to some constants names changed in
Looking in
This is confirmed b the compiler output that suggests to use Btw, this issue seems fixed looking here, but the library linked by the Arduino boards manager JSON file is still broken. |
Is there any way to solve this? |
I think these errors boil down to installed libraries I'm not sure which ones yet. The versions of those libraries is very important also. |
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h: In member function 'bool Weather::Fill(const JsonObject&)':
D:\Arduino\M5PaperWeather\weather\Weather.h:127:75: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ObjectRef, const char*>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyMain[0] = root["current"]["weather"][0]["main"].as<char >();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h:128:75: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ObjectRef, const char*>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyIcon[0] = root["current"]["weather"][0]["icon"].as<char >();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h:133:84: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::ArrayRef>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyMain[i] = hourly_list[i - 1]["weather"][0]["main"].as<char >();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
In file included from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\M5PaperWeather\weather\Weather.h:134:84: warning: 'typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char>::value, const char*>::type ArduinoJson6185_91::MemberProxy<TParent, TStringRef>::as() const [with T = char*; TObject = ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::MemberProxy<ArduinoJson6185_91::ElementProxy<ArduinoJson6185_91::ArrayRef>, const char*> >; TStringRef = const char*; typename ArduinoJson6185_91::enable_if<ArduinoJson6185_91::is_same<T, char*>::value, const char*>::type = const char*]' is deprecated: Replace as<char*>() with as<const char*>() [-Wdeprecated-declarations]
hourlyIcon[i] = hourly_list[i - 1]["weather"][0]["icon"].as<char *>();
^
In file included from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/JsonDocument.hpp:9,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/BasicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Document/DynamicJsonDocument.hpp:7,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.hpp:21,
from D:\Arduino\libraries\ArduinoJson\src/ArduinoJson.h:9,
from D:\Arduino\M5PaperWeather\weather\Weather.h:25,
from D:\Arduino\M5PaperWeather\weather\Data.h:24,
from D:\Arduino\M5PaperWeather\weather\weather.ino:30:
D:\Arduino\libraries\ArduinoJson\src/ArduinoJson/Object/MemberProxy.hpp:79:7: note: declared here
as() const {
^~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp: In member function 'void M5EPD::BatteryADCBegin()':
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:90:31: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc1_config_channel_atten(BAT_ADC_CHANNEL, ADC_ATTEN_DB_11);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryRaw()':
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
return adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:100:25: note: in expansion of macro 'BAT_ADC_CHANNEL'
return adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp: In member function 'uint32_t M5EPD::getBatteryVoltage()':
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: error: 'ADC1_GPIO35_CHANNEL' was not declared in this scope
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);
^~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:5:25: note: suggested alternative: 'ADC1_CHANNEL_7'
#define BAT_ADC_CHANNEL ADC1_GPIO35_CHANNEL
^~~~~~~~~~~~~~~~~~~
D:\Arduino\libraries\M5EPD\src\M5EPD.cpp:111:39: note: in expansion of macro 'BAT_ADC_CHANNEL'
adc_raw_value += adc1_get_raw(BAT_ADC_CHANNEL);
The text was updated successfully, but these errors were encountered: