Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A ArduinoJson
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Benoît Blanchon
  • ArduinoJson
  • Merge requests
  • !1693

Avoid `Arduino.h` if its features are disabled (fixes #1692)

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/paulocsanz/6.x into 6.x 3 years ago
  • Overview 14
  • Commits 8
  • Pipelines 0
  • Changes 1

Created by: paulocsanz

Fixes #1692 (closed)

It's not clear if this is the best solution. I'm open to suggestions and will modify the PR accordingly.

Compare
  • 6.x (base)

and
  • latest version
    49ac3e42
    8 commits, 2 years ago

1 file
+ 12
- 2

    Preferences

    File browser
    Compare changes
src/ArduinoJson/Configuration.hpp
+ 12
- 2
  • View file @ 49ac3e42


@@ -116,8 +116,6 @@
#ifdef ARDUINO
# include <Arduino.h>
// Enable support for Arduino's String class
# ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING
# define ARDUINOJSON_ENABLE_ARDUINO_STRING 1
@@ -133,6 +131,11 @@
# define ARDUINOJSON_ENABLE_ARDUINO_PRINT 1
# endif
# if ARDUINOJSON_ENABLE_ARDUINO_STRING || \
ARDUINO_JSON_ENABLE_ARDUINO_STREAM || ARDUINOJSON_ENABLE_ARDUINO_PRINT
# include <Arduino.h>
# endif
#else // ARDUINO
// Disable support for Arduino's String class
@@ -153,6 +156,9 @@
#endif // ARDUINO
#ifndef ARDUINOJSON_ENABLE_PROGMEM
# ifdef ARDUINO
# include <Arduino.h>
# endif
# if defined(PROGMEM) && defined(pgm_read_byte) && defined(pgm_read_dword) && \
defined(pgm_read_ptr) && defined(pgm_read_float)
# define ARDUINOJSON_ENABLE_PROGMEM 1
@@ -161,6 +167,10 @@
# endif
#endif
#if defined(ARDUINO) && ARDUINOJSON_ENABLE_PROGMEM
# include <Arduino.h>
#endif
// Convert unicode escape sequence (\u0123) to UTF-8
#ifndef ARDUINOJSON_DECODE_UNICODE
# define ARDUINOJSON_DECODE_UNICODE 1
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
2
2 participants
Benoît Blanchon
Administrator
Reference: bblanchon/ArduinoJson!1693
Source branch: github/fork/paulocsanz/6.x

Menu

Explore Projects Groups Snippets