-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ArduinoJson.h error: if (_destination->concat(_buffer)) #1812
Comments
Hi @gck303, Unfortunately, Teensy's core doesn't implement Arduino's It works on recent Teensy versions because they added a conversion from As a workaround, you can disable the support for Arduino's Best regards, |
Wow. Thank you. I cannot image how long I would have taken to find this. I have added the line "#define ARDUINOJSON_ENABLE_ARDUINO_STRING 0" and it compiles now. |
Same as 253da15 but for Teensy 2 Fixes bblanchon/ArduinoJson#1812
I opened a PR 🤞 |
Description
I would expect the code to complile!
Troubleshooter's report
Environment
Reproduction code
Remarks
I cannot get the ArduinoJson.h include to compile correctly. I get these errors:
In file included from C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson/Serialization/Writer.hpp:38:0,
from C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson/Serialization/serialize.hpp:7,
from C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson/Json/JsonSerializer.hpp:10,
from C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson/Variant/ConverterImpl.hpp:7,
from C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson.hpp:37,
from C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson.h:9,
from C:\Users\gck.CAMLEY\Documents\Arduino\sketch_oct11b\sketch_oct11b.ino:1:
C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson/Serialization/Writers/ArduinoStringWriter.hpp: In member function 'size_t ArduinoJson6194_1::Writer<String, void>::flush()':
C:\Users\gck.CAMLEY\Documents\libraries\ArduinoJson\src/ArduinoJson/Serialization/Writers/ArduinoStringWriter.hpp:42:29: error: could not convert '((ArduinoJson6194_1::Writer<String, void>)this)->ArduinoJson6194_1::Writer<String, void>::_destination->String::concat(((const char)((char*)(&((ArduinoJson6194_1::Writer<String, void>*)this)->ArduinoJson6194_1::Writer<String, void>::_buffer))))' from 'String' to 'bool'
if (_destination->concat(_buffer))
~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
Error compiling for board Teensy++ 2.0.
The text was updated successfully, but these errors were encountered: