Include Arduino.h if ARDUINO is defined (closes #1071)

This commit is contained in:
Simon Arlott
2019-08-10 19:32:19 +01:00
committed by Benoit Blanchon
parent 0d339300f9
commit b9c4a0c5f6
2 changed files with 6 additions and 3 deletions

View File

@ -6,6 +6,7 @@ HEAD
* Added `measureJson()` to the `ArduinoJson` namespace (PR #1069 by @nomis) * Added `measureJson()` to the `ArduinoJson` namespace (PR #1069 by @nomis)
* Fixed example `JsonConfigFile.ino` for ESP8266 * Fixed example `JsonConfigFile.ino` for ESP8266
* Include `Arduino.h` if `ARDUINO` is defined (PR #1071 by @nomis)
v6.11.3 (2019-07-22) v6.11.3 (2019-07-22)
------- -------

View File

@ -90,6 +90,8 @@
#ifdef ARDUINO #ifdef ARDUINO
#include <Arduino.h>
// Enable support for Arduino's String class // Enable support for Arduino's String class
#ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING #ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING
#define ARDUINOJSON_ENABLE_ARDUINO_STRING 1 #define ARDUINOJSON_ENABLE_ARDUINO_STRING 1
@ -107,17 +109,17 @@
#else // ARDUINO #else // ARDUINO
// Enable support for Arduino's String class // Disable support for Arduino's String class
#ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING #ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING
#define ARDUINOJSON_ENABLE_ARDUINO_STRING 0 #define ARDUINOJSON_ENABLE_ARDUINO_STRING 0
#endif #endif
// Enable support for Arduino's Stream class // Disable support for Arduino's Stream class
#ifndef ARDUINOJSON_ENABLE_ARDUINO_STREAM #ifndef ARDUINOJSON_ENABLE_ARDUINO_STREAM
#define ARDUINOJSON_ENABLE_ARDUINO_STREAM 0 #define ARDUINOJSON_ENABLE_ARDUINO_STREAM 0
#endif #endif
// Enable support for Arduino's Print class // Disable support for Arduino's Print class
#ifndef ARDUINOJSON_ENABLE_ARDUINO_PRINT #ifndef ARDUINOJSON_ENABLE_ARDUINO_PRINT
#define ARDUINOJSON_ENABLE_ARDUINO_PRINT 0 #define ARDUINOJSON_ENABLE_ARDUINO_PRINT 0
#endif #endif