├── .gitignore ├── AccelStepper ├── LICENSE ├── README.md ├── examples │ ├── AFMotor_ConstantSpeed │ │ └── AFMotor_ConstantSpeed.pde │ ├── AFMotor_MultiStepper │ │ └── AFMotor_MultiStepper.pde │ ├── Blocking │ │ └── Blocking.pde │ ├── Bounce │ │ └── Bounce.pde │ ├── ConstantSpeed │ │ └── ConstantSpeed.pde │ ├── DualMotorShield │ │ └── DualMotorShield.pde │ ├── MotorShield │ │ └── MotorShield.pde │ ├── MultiStepper │ │ └── MultiStepper.pde │ ├── MultipleSteppers │ │ └── MultipleSteppers.pde │ ├── Overshoot │ │ └── Overshoot.pde │ ├── ProportionalControl │ │ └── ProportionalControl.pde │ ├── Quickstop │ │ └── Quickstop.pde │ └── Random │ │ └── Random.pde ├── extras │ └── doc │ │ ├── AccelStepper_8h-source.html │ │ ├── annotated.html │ │ ├── classAccelStepper-members.html │ │ ├── classAccelStepper.html │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── files.html │ │ ├── functions.html │ │ ├── functions_func.html │ │ ├── index.html │ │ ├── tab_b.gif │ │ ├── tab_l.gif │ │ ├── tab_r.gif │ │ └── tabs.css ├── keywords.txt ├── library.properties └── src │ ├── AccelStepper.cpp │ ├── AccelStepper.h │ ├── MultiStepper.cpp │ └── MultiStepper.h ├── Adafruit_ADXL343 ├── Adafruit_ADXL343.cpp ├── Adafruit_ADXL343.h ├── README.md ├── examples │ ├── interrupts │ │ └── interrupts.ino │ ├── sensortest │ │ └── sensortest.ino │ └── singletap │ │ └── singletap.ino ├── library.properties └── license.txt ├── Adafruit_AM2315 ├── Adafruit_AM2315.cpp ├── Adafruit_AM2315.h ├── README.md ├── examples │ └── am2315test │ │ └── am2315test.ino └── library.properties ├── Adafruit_BME680_Library ├── Adafruit_BME680.cpp ├── Adafruit_BME680.h ├── Doxyfile ├── README.md ├── bme680.c ├── bme680.h ├── bme680_defs.h ├── examples │ ├── bme680async │ │ └── bme680async.ino │ ├── bme680oled │ │ └── bme680oled.ino │ └── bme680test │ │ └── bme680test.ino └── library.properties ├── Adafruit_BNO055 ├── Adafruit_BNO055.cpp ├── Adafruit_BNO055.h ├── LICENSE ├── OBJLoader │ ├── OBJLoader.txt │ └── OBJLoader.zip ├── README.md ├── assets │ └── board.jpg ├── code-of-conduct.md ├── examples │ ├── bunny │ │ └── bunny.ino │ ├── position │ │ └── position.ino │ ├── rawdata │ │ └── rawdata.ino │ ├── read_all_data │ │ └── read_all_data.ino │ ├── restore_offsets │ │ └── restore_offsets.ino │ ├── sensorapi │ │ └── sensorapi.ino │ └── webserial_3d │ │ └── webserial_3d.ino ├── examples_processing │ └── cuberotate │ │ ├── cuberotate.pde │ │ ├── data │ │ ├── bunny.mtl │ │ └── bunny.obj │ │ └── serialconfig.txt ├── library.properties └── utility │ ├── imumaths.h │ ├── matrix.h │ ├── quaternion.h │ └── vector.h ├── Adafruit_BusIO ├── Adafruit_BusIO_Register.cpp ├── Adafruit_BusIO_Register.h ├── Adafruit_I2CDevice.cpp ├── Adafruit_I2CDevice.h ├── Adafruit_I2CRegister.h ├── Adafruit_SPIDevice.cpp ├── Adafruit_SPIDevice.h ├── LICENSE ├── README.md ├── examples │ ├── i2c_address_detect │ │ └── i2c_address_detect.ino │ ├── i2c_readwrite │ │ └── i2c_readwrite.ino │ ├── i2c_registers │ │ └── i2c_registers.ino │ ├── i2corspi_register │ │ └── i2corspi_register.ino │ ├── spi_modetest │ │ └── spi_modetest.ino │ ├── spi_readwrite │ │ └── spi_readwrite.ino │ ├── spi_register_bits │ │ └── spi_register_bits.ino │ └── spi_registers │ │ └── spi_registers.ino └── library.properties ├── Adafruit_CC3000 ├── Adafruit_CC3000.cpp ├── Adafruit_CC3000.h ├── README.txt ├── ccspi.cpp ├── ccspi.h ├── examples │ ├── GeoLocation │ │ └── GeoLocation.ino │ ├── InternetTime │ │ └── InternetTime.ino │ ├── SendTweet │ │ └── SendTweet.ino │ ├── WebClient │ │ └── WebClient.ino │ ├── buildtest │ │ └── buildtest.ino │ └── smartconfigtest │ │ └── smartconfigtest.ino └── utility │ ├── cc3000_common.cpp │ ├── cc3000_common.h │ ├── debug.cpp │ ├── debug.h │ ├── evnt_handler.cpp │ ├── evnt_handler.h │ ├── hci.cpp │ ├── hci.h │ ├── host_driver_version.h │ ├── netapp.cpp │ ├── netapp.h │ ├── nvmem.cpp │ ├── nvmem.h │ ├── security.cpp │ ├── security.h │ ├── socket.cpp │ ├── socket.h │ ├── wlan.cpp │ └── wlan.h ├── Adafruit_ESP8266 ├── Adafruit_ESP8266.cpp ├── Adafruit_ESP8266.h ├── README.md ├── examples │ └── webclient │ │ └── webclient.ino ├── library.properties └── previous │ └── Adafruit_ESP8266.ino ├── Adafruit_GFX_Library ├── Adafruit_GFX.cpp ├── Adafruit_GFX.h ├── Adafruit_MonoOLED.cpp ├── Adafruit_MonoOLED.h ├── Adafruit_SPITFT.cpp ├── Adafruit_SPITFT.h ├── Adafruit_SPITFT_Macros.h ├── Fonts │ ├── FreeMono12pt7b.h │ ├── FreeMono18pt7b.h │ ├── FreeMono24pt7b.h │ ├── FreeMono9pt7b.h │ ├── FreeMonoBold12pt7b.h │ ├── FreeMonoBold18pt7b.h │ ├── FreeMonoBold24pt7b.h │ ├── FreeMonoBold9pt7b.h │ ├── FreeMonoBoldOblique12pt7b.h │ ├── FreeMonoBoldOblique18pt7b.h │ ├── FreeMonoBoldOblique24pt7b.h │ ├── FreeMonoBoldOblique9pt7b.h │ ├── FreeMonoOblique12pt7b.h │ ├── FreeMonoOblique18pt7b.h │ ├── FreeMonoOblique24pt7b.h │ ├── FreeMonoOblique9pt7b.h │ ├── FreeSans12pt7b.h │ ├── FreeSans18pt7b.h │ ├── FreeSans24pt7b.h │ ├── FreeSans9pt7b.h │ ├── FreeSansBold12pt7b.h │ ├── FreeSansBold18pt7b.h │ ├── FreeSansBold24pt7b.h │ ├── FreeSansBold9pt7b.h │ ├── FreeSansBoldOblique12pt7b.h │ ├── FreeSansBoldOblique18pt7b.h │ ├── FreeSansBoldOblique24pt7b.h │ ├── FreeSansBoldOblique9pt7b.h │ ├── FreeSansOblique12pt7b.h │ ├── FreeSansOblique18pt7b.h │ ├── FreeSansOblique24pt7b.h │ ├── FreeSansOblique9pt7b.h │ ├── FreeSerif12pt7b.h │ ├── FreeSerif18pt7b.h │ ├── FreeSerif24pt7b.h │ ├── FreeSerif9pt7b.h │ ├── FreeSerifBold12pt7b.h │ ├── FreeSerifBold18pt7b.h │ ├── FreeSerifBold24pt7b.h │ ├── FreeSerifBold9pt7b.h │ ├── FreeSerifBoldItalic12pt7b.h │ ├── FreeSerifBoldItalic18pt7b.h │ ├── FreeSerifBoldItalic24pt7b.h │ ├── FreeSerifBoldItalic9pt7b.h │ ├── FreeSerifItalic12pt7b.h │ ├── FreeSerifItalic18pt7b.h │ ├── FreeSerifItalic24pt7b.h │ ├── FreeSerifItalic9pt7b.h │ ├── Org_01.h │ ├── Picopixel.h │ ├── Tiny3x3a2pt7b.h │ └── TomThumb.h ├── README.md ├── examples │ └── mock_ili9341 │ │ └── mock_ili9341.ino ├── fontconvert │ ├── Makefile │ ├── fontconvert.c │ ├── fontconvert_win.md │ └── makefonts.sh ├── gfxfont.h ├── glcdfont.c ├── library.properties └── license.txt ├── Adafruit_HTU21DF_Library ├── Adafruit_HTU21DF.cpp ├── Adafruit_HTU21DF.h ├── README.md ├── examples │ └── HTU21DFtest │ │ └── HTU21DFtest.ino └── library.properties ├── Adafruit_ILI9341 ├── Adafruit_ILI9341.cpp ├── Adafruit_ILI9341.h ├── README.md ├── examples │ ├── breakouttouchpaint │ │ └── breakouttouchpaint.ino │ ├── graphicstest │ │ └── graphicstest.ino │ ├── graphicstest_featherwing │ │ └── graphicstest_featherwing.ino │ ├── graphicstest_pyportal │ │ └── graphicstest_pyportal.ino │ ├── mandelbrot │ │ └── mandelbrot.ino │ ├── onoffbutton │ │ └── onoffbutton.ino │ ├── onoffbutton_breakout │ │ └── onoffbutton_breakout.ino │ ├── pictureEmbed │ │ ├── dragon.h │ │ └── pictureEmbed.ino │ ├── pyportal_boing │ │ ├── graphics.h │ │ └── pyportal_boing.ino │ ├── touchpaint │ │ └── touchpaint.ino │ ├── touchpaint_featherwing │ │ └── touchpaint_featherwing.ino │ └── touchpaint_pyportal │ │ └── touchpaint_pyportal.ino └── library.properties ├── Adafruit_MQTT_Library ├── Adafruit_MQTT.cpp ├── Adafruit_MQTT.h ├── Adafruit_MQTT_Client.cpp ├── Adafruit_MQTT_Client.h ├── Adafruit_MQTT_FONA.h ├── LICENSE ├── README.md ├── examples │ ├── adafruitio_anon_time_esp8266 │ │ └── adafruitio_anon_time_esp8266.ino │ ├── adafruitio_errors_esp8266 │ │ └── adafruitio_errors_esp8266.ino │ ├── adafruitio_secure_airlift │ │ └── adafruitio_secure_airlift.ino │ ├── adafruitio_secure_esp8266 │ │ └── adafruitio_secure_esp8266.ino │ ├── adafruitio_time_esp8266 │ │ └── adafruitio_time_esp8266.ino │ ├── mqtt_2subs_esp8266 │ │ └── mqtt_2subs_esp8266.ino │ ├── mqtt_arbitrary_data │ │ ├── README.md │ │ ├── mqtt_arbitrary_data.ino │ │ └── python_subscriber │ │ │ ├── mqtt_figure.png │ │ │ ├── requirements.txt │ │ │ └── subscriber.py │ ├── mqtt_esp8266 │ │ └── mqtt_esp8266.ino │ ├── mqtt_esp8266_callback │ │ └── mqtt_esp8266_callback.ino │ ├── mqtt_ethernet │ │ └── mqtt_ethernet.ino │ ├── mqtt_fona │ │ ├── fonahelper.cpp │ │ └── mqtt_fona.ino │ ├── mqtt_winc1500 │ │ └── mqtt_winc1500.ino │ └── mqtt_yun │ │ └── mqtt_yun.ino ├── keywords.txt └── library.properties ├── Adafruit_STMPE610 ├── Adafruit_STMPE610.cpp ├── Adafruit_STMPE610.h ├── LICENSE ├── README.md ├── assets │ └── board.jpg ├── code-of-conduct.md ├── examples │ └── TouchTest │ │ └── TouchTest.ino └── library.properties ├── Adafruit_Sensor ├── Adafruit_Sensor.h ├── README.md └── library.properties ├── Adafruit_TSL2561 ├── Adafruit_TSL2561_U.cpp ├── Adafruit_TSL2561_U.h ├── README.md ├── examples │ └── sensorapi │ │ └── sensorapi.ino └── library.properties ├── Adafruit_TouchScreen ├── README.md ├── TouchScreen.cpp ├── TouchScreen.h ├── code-of-conduct.md ├── examples │ ├── touchscreendemo │ │ └── touchscreendemo.ino │ └── touchscreendemoshield │ │ └── touchscreendemoshield.ino ├── library.properties └── license.txt ├── Adafruit_Unified_Sensor ├── Adafruit_Sensor.cpp ├── Adafruit_Sensor.h ├── LICENSE.txt ├── README.md ├── examples │ └── sensortest │ │ └── sensortest.ino └── library.properties ├── Adafruit_WS2801 ├── Adafruit_WS2801.cpp ├── Adafruit_WS2801.h ├── README.txt └── examples │ ├── gridtest │ └── gridtest.pde │ └── strandtest │ └── strandtest.pde ├── ArduinoJson ├── ArduinoJson.h ├── CHANGELOG.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── SUPPORT.md ├── appveyor.yml ├── banner.svg ├── component.mk ├── examples │ ├── JsonConfigFile │ │ └── JsonConfigFile.ino │ ├── JsonFilterExample │ │ └── JsonFilterExample.ino │ ├── JsonGeneratorExample │ │ └── JsonGeneratorExample.ino │ ├── JsonHttpClient │ │ └── JsonHttpClient.ino │ ├── JsonParserExample │ │ └── JsonParserExample.ino │ ├── JsonServer │ │ └── JsonServer.ino │ ├── JsonUdpBeacon │ │ └── JsonUdpBeacon.ino │ ├── MsgPackParser │ │ └── MsgPackParser.ino │ ├── ProgmemExample │ │ └── ProgmemExample.ino │ └── StringExample │ │ └── StringExample.ino ├── extras │ ├── ArduinoJsonConfig.cmake.in │ ├── CompileOptions.cmake │ ├── ci │ │ ├── arduino.sh │ │ ├── build.sh │ │ ├── coverage.sh │ │ ├── fuzz.sh │ │ ├── platformio.sh │ │ └── test.sh │ ├── fuzzing │ │ ├── CMakeLists.txt │ │ ├── Makefile │ │ ├── fuzzer_main.cpp │ │ ├── json_fuzzer.cpp │ │ ├── json_seed_corpus │ │ │ ├── Comments.json │ │ │ ├── EmptyArray.json │ │ │ ├── EmptyObject.json │ │ │ ├── ExcessiveNesting.json │ │ │ ├── IntegerOverflow.json │ │ │ ├── Numbers.json │ │ │ ├── OpenWeatherMap.json │ │ │ ├── Strings.json │ │ │ └── WeatherUnderground.json │ │ ├── msgpack_fuzzer.cpp │ │ └── msgpack_seed_corpus │ │ │ ├── array16 │ │ │ ├── array32 │ │ │ ├── false │ │ │ ├── fixarray │ │ │ ├── fixint_negative │ │ │ ├── fixint_positive │ │ │ ├── fixmap │ │ │ ├── fixstr │ │ │ ├── float32 │ │ │ ├── float64 │ │ │ ├── int16 │ │ │ ├── int32 │ │ │ ├── int64 │ │ │ ├── int8 │ │ │ ├── map16 │ │ │ ├── map32 │ │ │ ├── nil │ │ │ ├── str16 │ │ │ ├── str32 │ │ │ ├── str8 │ │ │ ├── true │ │ │ ├── uint16 │ │ │ ├── uint32 │ │ │ ├── uint64 │ │ │ └── uint8 │ ├── scripts │ │ ├── build-arduino-package.sh │ │ ├── build-single-header.sh │ │ ├── publish-particle-library.sh │ │ ├── publish.sh │ │ └── wandbox │ │ │ ├── JsonGeneratorExample.cpp │ │ │ ├── JsonParserExample.cpp │ │ │ ├── MsgPackParserExample.cpp │ │ │ └── publish.sh │ └── tests │ │ ├── CMakeLists.txt │ │ ├── ElementProxy │ │ ├── CMakeLists.txt │ │ ├── add.cpp │ │ ├── clear.cpp │ │ ├── compare.cpp │ │ ├── remove.cpp │ │ ├── set.cpp │ │ ├── size.cpp │ │ └── subscript.cpp │ │ ├── FailingBuilds │ │ ├── CMakeLists.txt │ │ ├── Issue1189.cpp │ │ ├── Issue978.cpp │ │ ├── read_long_long.cpp │ │ └── write_long_long.cpp │ │ ├── Helpers │ │ ├── CustomReader.hpp │ │ ├── Stream.h │ │ ├── WString.h │ │ └── progmem_emulation.hpp │ │ ├── IntegrationTests │ │ ├── CMakeLists.txt │ │ ├── gbathree.cpp │ │ ├── issue772.cpp │ │ ├── openweathermap.cpp │ │ └── round_trip.cpp │ │ ├── JsonArray │ │ ├── CMakeLists.txt │ │ ├── add.cpp │ │ ├── copyArray.cpp │ │ ├── createNested.cpp │ │ ├── equals.cpp │ │ ├── get.cpp │ │ ├── isNull.cpp │ │ ├── iterator.cpp │ │ ├── memoryUsage.cpp │ │ ├── nesting.cpp │ │ ├── remove.cpp │ │ ├── size.cpp │ │ ├── std_string.cpp │ │ ├── subscript.cpp │ │ └── undefined.cpp │ │ ├── JsonDeserializer │ │ ├── CMakeLists.txt │ │ ├── DeserializationError.cpp │ │ ├── array.cpp │ │ ├── array_static.cpp │ │ ├── filter.cpp │ │ ├── incomplete_input.cpp │ │ ├── input_types.cpp │ │ ├── invalid_input.cpp │ │ ├── misc.cpp │ │ ├── nestingLimit.cpp │ │ ├── number.cpp │ │ ├── object.cpp │ │ ├── object_static.cpp │ │ └── string.cpp │ │ ├── JsonDocument │ │ ├── BasicJsonDocument.cpp │ │ ├── CMakeLists.txt │ │ ├── DynamicJsonDocument.cpp │ │ ├── StaticJsonDocument.cpp │ │ ├── add.cpp │ │ ├── compare.cpp │ │ ├── containsKey.cpp │ │ ├── createNested.cpp │ │ ├── isNull.cpp │ │ ├── nesting.cpp │ │ ├── remove.cpp │ │ ├── shrinkToFit.cpp │ │ ├── size.cpp │ │ └── subscript.cpp │ │ ├── JsonObject │ │ ├── CMakeLists.txt │ │ ├── containsKey.cpp │ │ ├── copy.cpp │ │ ├── createNestedArray.cpp │ │ ├── createNestedObject.cpp │ │ ├── equals.cpp │ │ ├── invalid.cpp │ │ ├── isNull.cpp │ │ ├── iterator.cpp │ │ ├── memoryUsage.cpp │ │ ├── nesting.cpp │ │ ├── remove.cpp │ │ ├── size.cpp │ │ ├── std_string.cpp │ │ └── subscript.cpp │ │ ├── JsonSerializer │ │ ├── CMakeLists.txt │ │ ├── CustomWriter.cpp │ │ ├── JsonArray.cpp │ │ ├── JsonArrayPretty.cpp │ │ ├── JsonObject.cpp │ │ ├── JsonObjectPretty.cpp │ │ ├── JsonVariant.cpp │ │ ├── misc.cpp │ │ ├── std_stream.cpp │ │ └── std_string.cpp │ │ ├── JsonVariant │ │ ├── CMakeLists.txt │ │ ├── add.cpp │ │ ├── as.cpp │ │ ├── clear.cpp │ │ ├── compare.cpp │ │ ├── containsKey.cpp │ │ ├── copy.cpp │ │ ├── createNested.cpp │ │ ├── is.cpp │ │ ├── isnull.cpp │ │ ├── memoryUsage.cpp │ │ ├── misc.cpp │ │ ├── nesting.cpp │ │ ├── or.cpp │ │ ├── overflow.cpp │ │ ├── remove.cpp │ │ ├── set.cpp │ │ ├── subscript.cpp │ │ ├── types.cpp │ │ └── undefined.cpp │ │ ├── MemberProxy │ │ ├── CMakeLists.txt │ │ ├── add.cpp │ │ ├── clear.cpp │ │ ├── compare.cpp │ │ ├── containsKey.cpp │ │ ├── remove.cpp │ │ ├── set.cpp │ │ ├── size.cpp │ │ └── subscript.cpp │ │ ├── MemoryPool │ │ ├── CMakeLists.txt │ │ ├── StringBuilder.cpp │ │ ├── allocString.cpp │ │ ├── allocVariant.cpp │ │ ├── clear.cpp │ │ └── size.cpp │ │ ├── Misc │ │ ├── CMakeLists.txt │ │ ├── FloatParts.cpp │ │ ├── Readers.cpp │ │ ├── StringAdapters.cpp │ │ ├── StringWriter.cpp │ │ ├── TypeTraits.cpp │ │ ├── Utf16.cpp │ │ ├── Utf8.cpp │ │ ├── conflicts.cpp │ │ ├── custom_string.hpp │ │ ├── unsigned_char.cpp │ │ ├── version.cpp │ │ └── weird_strcmp.hpp │ │ ├── MixedConfiguration │ │ ├── CMakeLists.txt │ │ ├── cpp11.cpp │ │ ├── decode_unicode_0.cpp │ │ ├── decode_unicode_1.cpp │ │ ├── enable_alignment_0.cpp │ │ ├── enable_alignment_1.cpp │ │ ├── enable_comments_0.cpp │ │ ├── enable_comments_1.cpp │ │ ├── enable_infinity_0.cpp │ │ ├── enable_infinity_1.cpp │ │ ├── enable_nan_0.cpp │ │ ├── enable_nan_1.cpp │ │ ├── enable_progmem_1.cpp │ │ ├── use_double_0.cpp │ │ ├── use_double_1.cpp │ │ ├── use_long_long_0.cpp │ │ └── use_long_long_1.cpp │ │ ├── MsgPackDeserializer │ │ ├── CMakeLists.txt │ │ ├── deserializeArray.cpp │ │ ├── deserializeObject.cpp │ │ ├── deserializeStaticVariant.cpp │ │ ├── deserializeVariant.cpp │ │ ├── doubleToFloat.cpp │ │ ├── incompleteInput.cpp │ │ ├── input_types.cpp │ │ ├── nestingLimit.cpp │ │ └── notSupported.cpp │ │ ├── MsgPackSerializer │ │ ├── CMakeLists.txt │ │ ├── destination_types.cpp │ │ ├── measure.cpp │ │ ├── misc.cpp │ │ ├── serializeArray.cpp │ │ ├── serializeObject.cpp │ │ └── serializeVariant.cpp │ │ ├── Numbers │ │ ├── CMakeLists.txt │ │ ├── parseFloat.cpp │ │ ├── parseInteger.cpp │ │ └── parseNumber.cpp │ │ ├── TextFormatter │ │ ├── CMakeLists.txt │ │ ├── writeFloat.cpp │ │ └── writeString.cpp │ │ └── catch │ │ ├── CMakeLists.txt │ │ ├── catch.cpp │ │ └── catch.hpp ├── keywords.txt ├── library.json ├── library.properties └── src │ ├── ArduinoJson.h │ ├── ArduinoJson.hpp │ ├── ArduinoJson │ ├── Array │ │ ├── ArrayFunctions.hpp │ │ ├── ArrayImpl.hpp │ │ ├── ArrayIterator.hpp │ │ ├── ArrayRef.hpp │ │ ├── ArrayShortcuts.hpp │ │ ├── ElementProxy.hpp │ │ └── Utilities.hpp │ ├── Collection │ │ ├── CollectionData.hpp │ │ └── CollectionImpl.hpp │ ├── Configuration.hpp │ ├── Deserialization │ │ ├── DeserializationError.hpp │ │ ├── Filter.hpp │ │ ├── NestingLimit.hpp │ │ ├── Reader.hpp │ │ ├── Readers │ │ │ ├── ArduinoStreamReader.hpp │ │ │ ├── ArduinoStringReader.hpp │ │ │ ├── FlashReader.hpp │ │ │ ├── IteratorReader.hpp │ │ │ ├── RamReader.hpp │ │ │ ├── StdStreamReader.hpp │ │ │ └── VariantReader.hpp │ │ └── deserialize.hpp │ ├── Document │ │ ├── BasicJsonDocument.hpp │ │ ├── DynamicJsonDocument.hpp │ │ ├── JsonDocument.hpp │ │ └── StaticJsonDocument.hpp │ ├── Json │ │ ├── EscapeSequence.hpp │ │ ├── JsonDeserializer.hpp │ │ ├── JsonSerializer.hpp │ │ ├── Latch.hpp │ │ ├── PrettyJsonSerializer.hpp │ │ ├── TextFormatter.hpp │ │ ├── Utf16.hpp │ │ └── Utf8.hpp │ ├── Memory │ │ ├── Alignment.hpp │ │ ├── MemoryPool.hpp │ │ ├── StringBuilder.hpp │ │ └── StringSlot.hpp │ ├── Misc │ │ ├── SerializedValue.hpp │ │ └── Visitable.hpp │ ├── MsgPack │ │ ├── MsgPackDeserializer.hpp │ │ ├── MsgPackSerializer.hpp │ │ ├── endianess.hpp │ │ └── ieee754.hpp │ ├── Namespace.hpp │ ├── Numbers │ │ ├── Float.hpp │ │ ├── FloatParts.hpp │ │ ├── FloatTraits.hpp │ │ ├── Integer.hpp │ │ ├── convertNumber.hpp │ │ ├── parseFloat.hpp │ │ ├── parseInteger.hpp │ │ └── parseNumber.hpp │ ├── Object │ │ ├── MemberProxy.hpp │ │ ├── ObjectFunctions.hpp │ │ ├── ObjectImpl.hpp │ │ ├── ObjectIterator.hpp │ │ ├── ObjectRef.hpp │ │ ├── ObjectShortcuts.hpp │ │ └── Pair.hpp │ ├── Operators │ │ ├── VariantComparisons.hpp │ │ ├── VariantOperators.hpp │ │ ├── VariantOr.hpp │ │ └── VariantShortcuts.hpp │ ├── Polyfills │ │ ├── alias_cast.hpp │ │ ├── assert.hpp │ │ ├── attributes.hpp │ │ ├── ctype.hpp │ │ ├── gsl │ │ │ └── not_null.hpp │ │ ├── limits.hpp │ │ ├── math.hpp │ │ ├── mpl │ │ │ └── max.hpp │ │ ├── pgmspace.hpp │ │ ├── safe_strcmp.hpp │ │ ├── type_traits.hpp │ │ ├── type_traits │ │ │ ├── conditional.hpp │ │ │ ├── declval.hpp │ │ │ ├── enable_if.hpp │ │ │ ├── integral_constant.hpp │ │ │ ├── is_array.hpp │ │ │ ├── is_base_of.hpp │ │ │ ├── is_class.hpp │ │ │ ├── is_const.hpp │ │ │ ├── is_convertible.hpp │ │ │ ├── is_enum.hpp │ │ │ ├── is_floating_point.hpp │ │ │ ├── is_integral.hpp │ │ │ ├── is_same.hpp │ │ │ ├── is_signed.hpp │ │ │ ├── is_unsigned.hpp │ │ │ ├── make_unsigned.hpp │ │ │ ├── remove_const.hpp │ │ │ ├── remove_reference.hpp │ │ │ └── type_identity.hpp │ │ └── utility.hpp │ ├── Serialization │ │ ├── Writer.hpp │ │ ├── Writers │ │ │ ├── ArduinoStringWriter.hpp │ │ │ ├── DummyWriter.hpp │ │ │ ├── PrintWriter.hpp │ │ │ ├── StaticStringWriter.hpp │ │ │ ├── StdStreamWriter.hpp │ │ │ └── StdStringWriter.hpp │ │ ├── measure.hpp │ │ └── serialize.hpp │ ├── StringStorage │ │ ├── StringCopier.hpp │ │ ├── StringMover.hpp │ │ └── StringStorage.hpp │ ├── Strings │ │ ├── ArduinoStringAdapter.hpp │ │ ├── ConstRamStringAdapter.hpp │ │ ├── FlashStringAdapter.hpp │ │ ├── IsString.hpp │ │ ├── IsWriteableString.hpp │ │ ├── RamStringAdapter.hpp │ │ ├── SizedFlashStringAdapter.hpp │ │ ├── SizedRamStringAdapter.hpp │ │ ├── StlStringAdapter.hpp │ │ ├── StoragePolicy.hpp │ │ ├── String.hpp │ │ └── StringAdapters.hpp │ ├── Variant │ │ ├── SlotFunctions.hpp │ │ ├── VariantAs.hpp │ │ ├── VariantAsImpl.hpp │ │ ├── VariantContent.hpp │ │ ├── VariantData.hpp │ │ ├── VariantFunctions.hpp │ │ ├── VariantImpl.hpp │ │ ├── VariantRef.hpp │ │ ├── VariantSlot.hpp │ │ └── VariantTo.hpp │ ├── compatibility.hpp │ └── version.hpp │ └── CMakeLists.txt ├── DS1307RTC ├── DS1307RTC.cpp ├── DS1307RTC.h ├── docs │ └── issue_template.md ├── examples │ ├── ReadTest │ │ └── ReadTest.ino │ └── SetTime │ │ └── SetTime.ino ├── keywords.txt ├── library.json ├── library.properties └── readme.txt ├── DallasTemperature ├── DallasTemperature.cpp ├── DallasTemperature.h ├── README.md ├── examples │ ├── Alarm │ │ └── Alarm.pde │ ├── AlarmHandler │ │ └── AlarmHandler.pde │ ├── Multibus_simple │ │ └── Multibus_simple.ino │ ├── Multiple │ │ └── Multiple.pde │ ├── Simple │ │ └── Simple.pde │ ├── Single │ │ └── Single.pde │ ├── Tester │ │ └── Tester.pde │ ├── TwoPin_DS18B20 │ │ └── TwoPin_DS18B20.ino │ ├── UserDataDemo │ │ └── UserDataDemo.ino │ ├── UserDataWriteBatch │ │ └── UserDataWriteBatch.ino │ ├── WaitForConversion │ │ └── WaitForConversion.pde │ ├── WaitForConversion2 │ │ └── WaitForConversion2.pde │ ├── oneWireSearch │ │ └── oneWireSearch.ino │ └── setUserData │ │ └── SetUserData.ino ├── keywords.txt ├── library.json └── library.properties ├── EasingLibrary ├── .cproject ├── .project ├── BackEase.cpp ├── BackEase.h ├── BounceEase.cpp ├── BounceEase.h ├── CircularEase.cpp ├── CircularEase.h ├── CubicEase.cpp ├── CubicEase.h ├── EasingBase.cpp ├── EasingBase.h ├── EasingConstants.h ├── EasingLibrary.h ├── ElasticEase.cpp ├── ElasticEase.h ├── ExponentialEase.cpp ├── ExponentialEase.h ├── LinearEase.cpp ├── LinearEase.h ├── QuadraticEase.cpp ├── QuadraticEase.h ├── QuarticEase.cpp ├── QuarticEase.h ├── QuinticEase.cpp ├── QuinticEase.h ├── SineEase.cpp └── SineEase.h ├── Encoder ├── Encoder.cpp ├── Encoder.h ├── README.md ├── examples │ ├── Basic │ │ └── Basic.pde │ ├── NoInterrupts │ │ └── NoInterrupts.pde │ ├── SpeedTest │ │ └── SpeedTest.pde │ └── TwoKnobs │ │ └── TwoKnobs.pde ├── keywords.txt ├── library.json ├── library.properties └── utility │ ├── direct_pin_read.h │ ├── interrupt_config.h │ └── interrupt_pins.h ├── EspSoftwareSerial ├── LICENSE ├── README.md ├── examples │ ├── loopback │ │ └── loopback.ino │ ├── onewiretest │ │ └── onewiretest.ino │ ├── repeater │ │ └── repeater.ino │ ├── servoTester │ │ └── servoTester.ino │ └── swsertest │ │ └── swsertest.ino ├── keywords.txt ├── library.json ├── library.properties └── src │ ├── SoftwareSerial.cpp │ ├── SoftwareSerial.h │ └── circular_queue │ ├── Delegate.h │ ├── MultiDelegate.h │ ├── circular_queue.h │ ├── circular_queue_mp.h │ └── ghostl.h ├── FlashStorage ├── examples │ ├── EmulateEEPROM │ │ └── EmulateEEPROM.ino │ ├── FlashStoreAndRetrieve │ │ └── FlashStoreAndRetrieve.ino │ └── StoreNameAndSurname │ │ └── StoreNameAndSurname.ino ├── library.json ├── library.properties ├── readme.md └── src │ ├── FlashAsEEPROM.cpp │ ├── FlashAsEEPROM.h │ ├── FlashStorage.cpp │ └── FlashStorage.h ├── FlexCAN ├── FlexCAN.cpp ├── FlexCAN.h ├── FlexCAN.kdev4 ├── FlexCAN_pins.png ├── FlexCAN_pins_35.png ├── FlexCAN_pins_36.png ├── FlexCAN_pins_alt.png ├── README.md ├── examples │ ├── CANTest │ │ └── CANTest.ino │ ├── ObjectOrientedCAN │ │ └── ObjectOrientedCAN.ino │ ├── ObjectOrientedCANExtendedIDs │ │ └── ObjectOrientedCANExtendedIDs.ino │ └── Rx-SingleBus-WithObjects │ │ └── Rx-SingleBus-WithObjects.ino ├── keywords.txt └── kinetis_flexcan.h ├── HttpClient ├── HttpClient.cpp ├── HttpClient.h ├── README.md ├── b64.cpp ├── b64.h ├── examples │ └── SimpleHttpExample │ │ └── SimpleHttpExample.ino ├── keywords.txt └── library.properties ├── I2Cdev ├── I2Cdev.cpp ├── I2Cdev.h └── keywords.txt ├── Joystick ├── examples │ ├── DrivingControllerTest │ │ └── DrivingControllerTest.ino │ ├── FlightControllerTest │ │ └── FlightControllerTest.ino │ ├── GamepadExample │ │ └── GamepadExample.ino │ ├── HatSwitchTest │ │ └── HatSwitchTest.ino │ ├── JoystickButton │ │ └── JoystickButton.ino │ ├── JoystickKeyboard │ │ └── JoystickKeyboard.ino │ ├── JoystickTest │ │ └── JoystickTest.ino │ └── MultipleJoystickTest │ │ └── MultipleJoystickTest.ino ├── library.properties └── src │ ├── DynamicHID │ ├── DynamicHID.cpp │ └── DynamicHID.h │ ├── Joystick.cpp │ └── Joystick.h ├── LEDMatrixDriver ├── LICENSE ├── README.md ├── examples │ ├── AFGFXMarquee │ │ └── AFGFXMarquee.ino │ ├── DrawSprites │ │ └── DrawSprites.ino │ ├── FrameBuffer_Scrolling │ │ └── FrameBuffer_Scrolling.ino │ ├── MarqueeText │ │ └── MarqueeText.ino │ ├── MarqueeTextFaster │ │ └── MarqueeTextFaster.ino │ ├── SetPixel │ │ └── SetPixel.ino │ └── seven-segment │ │ └── seven-segment.ino ├── library.properties └── src │ ├── LEDMatrixDriver.cpp │ └── LEDMatrixDriver.hpp ├── LPD8806 ├── LPD8806.cpp ├── LPD8806.h ├── README.md ├── examples │ ├── LEDbeltKit │ │ └── LEDbeltKit.ino │ ├── LEDbeltKit_alt │ │ └── LEDbeltKit_alt.ino │ ├── longstrandtest │ │ └── longstrandtest.ino │ ├── rainbow_strip │ │ └── rainbow_strip.ino │ └── strandtest │ │ └── strandtest.ino └── library.properties ├── LinkedList ├── .gitattributes ├── .gitignore ├── LICENSE.txt ├── LinkedList.h ├── README.md ├── examples │ ├── ClassList │ │ └── ClassList.pde │ ├── SimpleIntegerList │ │ └── SimpleIntegerList.pde │ └── Sort │ │ └── Sort.ino ├── keywords.txt ├── library.json ├── library.properties └── tests.cpp ├── MPU6050 ├── Examples │ ├── MPU6050_DMP6 │ │ ├── MPU6050_DMP6.ino │ │ └── Processing │ │ │ └── MPUTeapot.pde │ ├── MPU6050_raw │ │ └── MPU6050_raw.ino │ └── MPU9150_raw │ │ └── MPU9150_raw.ino ├── MPU6050.cpp ├── MPU6050.h ├── MPU6050_6Axis_MotionApps20.h ├── MPU6050_9Axis_MotionApps41.h └── helper_3dmath.h ├── NMEA ├── examples │ ├── gprmc_course │ │ └── gprmc_course.pde │ ├── gprmc_distance │ │ └── gprmc_distance.pde │ ├── gprmc_position │ │ └── gprmc_position.pde │ ├── gprmc_speed │ │ └── gprmc_speed.pde │ └── nmea_sentence │ │ └── nmea_sentence.pde ├── keywords.txt ├── nmea.cpp └── nmea.h ├── NTPClient ├── CHANGELOG ├── NTPClient.cpp ├── NTPClient.h ├── README.md ├── examples │ ├── Advanced │ │ └── Advanced.ino │ └── Basic │ │ └── Basic.ino ├── keywords.txt ├── library.json └── library.properties ├── NeoGPS ├── LICENSE ├── README.md ├── examples │ ├── NMEA │ │ └── NMEA.ino │ ├── NMEAGSV │ │ └── NMEAGSV.ino │ ├── NMEASDlog │ │ └── NMEASDlog.ino │ ├── NMEA_isr │ │ └── NMEA_isr.ino │ ├── NMEAaverage │ │ └── NMEAaverage.ino │ ├── NMEAbenchmark │ │ └── NMEAbenchmark.ino │ ├── NMEAblink │ │ └── NMEAblink.ino │ ├── NMEAdiagnostic │ │ └── NMEAdiagnostic.ino │ ├── NMEAdistance │ │ └── NMEAdistance.ino │ ├── NMEAloc │ │ └── NMEAloc.ino │ ├── NMEAlocDMS │ │ └── NMEAlocDMS.ino │ ├── NMEAorder │ │ └── NMEAorder.ino │ ├── NMEArevGeoCache │ │ └── NMEArevGeoCache.ino │ ├── NMEAsimple │ │ └── NMEAsimple.ino │ ├── NMEAtest │ │ └── NMEAtest.ino │ ├── NMEAtimezone │ │ └── NMEAtimezone.ino │ ├── PGRM │ │ └── PGRM.ino │ ├── PUBX │ │ └── PUBX.ino │ ├── SyncTime │ │ └── SyncTime.ino │ ├── Tabular │ │ └── Tabular.ino │ ├── ublox │ │ └── ublox.ino │ └── ubloxRate │ │ └── ubloxRate.ino ├── extras │ ├── configs │ │ ├── DTL │ │ │ ├── GPSfix_cfg.h │ │ │ ├── NMEAGPS_cfg.h │ │ │ └── NeoGPS_cfg.h │ │ ├── Full │ │ │ ├── GPSfix_cfg.h │ │ │ ├── NMEAGPS_cfg.h │ │ │ └── NeoGPS_cfg.h │ │ ├── Minimal │ │ │ ├── GPSfix_cfg.h │ │ │ ├── NMEAGPS_cfg.h │ │ │ └── NeoGPS_cfg.h │ │ ├── Nominal │ │ │ ├── GPSfix_cfg.h │ │ │ ├── NMEAGPS_cfg.h │ │ │ └── NeoGPS_cfg.h │ │ ├── PUBX │ │ │ ├── GPSfix_cfg.h │ │ │ ├── NMEAGPS_cfg.h │ │ │ └── NeoGPS_cfg.h │ │ └── Speed │ │ │ ├── GPSfix_cfg.h │ │ │ ├── NMEAGPS_cfg.h │ │ │ └── NeoGPS_cfg.h │ └── doc │ │ ├── Acknowledgements.md │ │ ├── CharOriented.md │ │ ├── Choosing.md │ │ ├── Coherency.md │ │ ├── Configurations.md │ │ ├── Data Model.md │ │ ├── Examples.md │ │ ├── Extending.md │ │ ├── Garmin.md │ │ ├── Installing.md │ │ ├── License.md │ │ ├── Location.md │ │ ├── Merging.md │ │ ├── Performance.md │ │ ├── Program.md │ │ ├── RAM.md │ │ ├── Tradeoffs.md │ │ ├── Troubleshooting.md │ │ ├── images │ │ ├── GPS Timing 0.jpg │ │ ├── GPS Timing 1.jpg │ │ ├── GPS Timing 2.jpg │ │ └── example.png │ │ ├── readme.txt │ │ └── ublox.md ├── library.properties └── src │ ├── CosaCompat.h │ ├── DMS.cpp │ ├── DMS.h │ ├── GPSTime.cpp │ ├── GPSTime.h │ ├── GPSfix.h │ ├── GPSfix_cfg.h │ ├── GPSport.h │ ├── Garmin │ ├── GrmNMEA.cpp │ ├── GrmNMEA.h │ └── PGRM_cfg.h │ ├── Location.cpp │ ├── Location.h │ ├── NMEAGPS.cpp │ ├── NMEAGPS.h │ ├── NMEAGPS_cfg.h │ ├── NMEAGPSprivate.h │ ├── NeoGPS_cfg.h │ ├── NeoTime.cpp │ ├── NeoTime.h │ ├── Streamers.cpp │ ├── Streamers.h │ └── ublox │ ├── PUBX_cfg.h │ ├── ubxGPS.cpp │ ├── ubxGPS.h │ ├── ubxNMEA.cpp │ ├── ubxNMEA.h │ ├── ubx_cfg.h │ ├── ubxmsg.cpp │ └── ubxmsg.h ├── OneWire ├── OneWire.cpp ├── OneWire.h ├── docs │ └── issue_template.md ├── examples │ ├── DS18x20_Temperature │ │ └── DS18x20_Temperature.pde │ ├── DS2408_Switch │ │ └── DS2408_Switch.pde │ └── DS250x_PROM │ │ └── DS250x_PROM.pde ├── keywords.txt ├── library.json ├── library.properties └── util │ ├── OneWire_direct_gpio.h │ └── OneWire_direct_regtype.h ├── PID ├── PID_v1.cpp ├── PID_v1.h ├── README.txt ├── examples │ ├── PID_AdaptiveTunings │ │ └── PID_AdaptiveTunings.ino │ ├── PID_Basic │ │ └── PID_Basic.ino │ ├── PID_PonM │ │ └── PID_PonM.ino │ └── PID_RelayOutput │ │ └── PID_RelayOutput.ino ├── keywords.txt ├── library.json └── library.properties ├── PS4-esp32 ├── Kconfig ├── README.md ├── component.mk ├── examples │ ├── PS4ReceiveData │ │ └── PS4ReceiveData.ino │ ├── PS4SendData │ │ └── PS4SendData.ino │ └── Ps4Connect │ │ └── Ps4Connect.ino ├── keywords.txt ├── library.properties └── src │ ├── PS4Controller.cpp │ ├── PS4Controller.h │ ├── common │ └── bt_target.h │ ├── osi │ └── allocator.h │ ├── ps4.c │ ├── ps4.h │ ├── ps4_gap.c │ ├── ps4_int.h │ ├── ps4_parser.c │ ├── ps4_spp.c │ └── stack │ ├── bt_types.h │ ├── btm_api.h │ ├── gap_api.h │ ├── hcidefs.h │ ├── l2c_api.h │ └── profiles_api.h ├── ParallaxMouseSensor ├── ParallaxMouseSensor.cpp ├── ParallaxMouseSensor.h └── examples │ └── Read │ └── Read.ino ├── PubSubClient ├── CHANGES.txt ├── LICENSE.txt ├── README.md ├── examples │ ├── mqtt_auth │ │ └── mqtt_auth.ino │ ├── mqtt_basic │ │ └── mqtt_basic.ino │ ├── mqtt_esp8266 │ │ └── mqtt_esp8266.ino │ ├── mqtt_large_message │ │ └── mqtt_large_message.ino │ ├── mqtt_publish_in_callback │ │ └── mqtt_publish_in_callback.ino │ ├── mqtt_reconnect_nonblocking │ │ └── mqtt_reconnect_nonblocking.ino │ └── mqtt_stream │ │ └── mqtt_stream.ino ├── keywords.txt ├── library.json ├── library.properties ├── src │ ├── PubSubClient.cpp │ └── PubSubClient.h └── tests │ ├── Makefile │ ├── README.md │ ├── src │ ├── connect_spec.cpp │ ├── keepalive_spec.cpp │ ├── lib │ │ ├── Arduino.h │ │ ├── BDDTest.cpp │ │ ├── BDDTest.h │ │ ├── Buffer.cpp │ │ ├── Buffer.h │ │ ├── Client.h │ │ ├── IPAddress.cpp │ │ ├── IPAddress.h │ │ ├── Print.h │ │ ├── ShimClient.cpp │ │ ├── ShimClient.h │ │ ├── Stream.cpp │ │ ├── Stream.h │ │ └── trace.h │ ├── publish_spec.cpp │ ├── receive_spec.cpp │ └── subscribe_spec.cpp │ ├── testcases │ ├── __init__.py │ ├── mqtt_basic.py │ ├── mqtt_publish_in_callback.py │ └── settings.py │ └── testsuite.py ├── README.md ├── Relay16 ├── Relay16.cpp ├── Relay16.h └── examples │ └── relay16_example │ └── relay16_example.ino ├── RingBuffer ├── LICENSE ├── README.md ├── examples │ ├── BigBuffer │ │ └── BigBuffer.ino │ ├── BufferInterrupt │ │ └── BufferInterrupt.ino │ ├── PushAndPop │ │ └── PushAndPop.ino │ └── README.md ├── keywords.txt ├── library.properties └── src │ └── RingBuf.h ├── RunningAverage ├── RunningAverage.cpp ├── RunningAverage.h ├── examples │ └── Basic │ │ └── Basic.ino └── keywords.txt ├── SD ├── README.adoc ├── examples │ ├── CardInfo │ │ └── CardInfo.ino │ ├── Datalogger │ │ └── Datalogger.ino │ ├── DumpFile │ │ └── DumpFile.ino │ ├── Files │ │ └── Files.ino │ ├── NonBlockingWrite │ │ └── NonBlockingWrite.ino │ ├── ReadWrite │ │ └── ReadWrite.ino │ └── listfiles │ │ └── listfiles.ino ├── extras │ └── codespell-ignore-words-list.txt ├── keywords.txt ├── library.properties └── src │ ├── File.cpp │ ├── README.txt │ ├── SD.cpp │ ├── SD.h │ └── utility │ ├── FatStructs.h │ ├── Sd2Card.cpp │ ├── Sd2Card.h │ ├── Sd2PinMap.h │ ├── SdFat.h │ ├── SdFatUtil.h │ ├── SdFatmainpage.h │ ├── SdFile.cpp │ ├── SdInfo.h │ └── SdVolume.cpp ├── Servo ├── README.adoc ├── examples │ ├── Knob │ │ └── Knob.ino │ └── Sweep │ │ └── Sweep.ino ├── keywords.txt ├── library.properties └── src │ ├── Servo.h │ ├── avr │ ├── Servo.cpp │ └── ServoTimers.h │ ├── mbed │ ├── Servo.cpp │ └── ServoTimers.h │ ├── megaavr │ ├── Servo.cpp │ └── ServoTimers.h │ ├── nrf52 │ ├── Servo.cpp │ └── ServoTimers.h │ ├── sam │ ├── Servo.cpp │ └── ServoTimers.h │ ├── samd │ ├── Servo.cpp │ └── ServoTimers.h │ └── stm32f4 │ ├── Servo.cpp │ └── ServoTimers.h ├── SpacebrewYun ├── README.adoc ├── examples │ ├── inputOutput │ │ └── inputOutput.ino │ ├── spacebrewBoolean │ │ └── spacebrewBoolean.ino │ ├── spacebrewRange │ │ └── spacebrewRange.ino │ └── spacebrewString │ │ └── spacebrewString.ino ├── keywords.txt ├── library.properties └── src │ ├── SpacebrewYun.cpp │ └── SpacebrewYun.h ├── SparkFun_CAN-Bus_Arduino_Library ├── LICENSE.md ├── README.md ├── _gitattributes ├── _gitignore ├── examples │ ├── CAN_Read_Demo │ │ └── CAN_Read_Demo.ino │ ├── CAN_Write_Demo │ │ └── CAN_Write_Demo.ino │ ├── SparkFun_CAN_Demo │ │ └── SparkFun_CAN_Demo.ino │ ├── SparkFun_ECU_Demo │ │ └── SparkFun_ECU_Demo.ino │ ├── SparkFun_GPS_Demo │ │ └── SparkFun_GPS_Demo.ino │ ├── SparkFun_Joystick_Demo │ │ └── SparkFun_Joystick_Demo.ino │ ├── SparkFun_SD_Demo │ │ └── SparkFun_SD_Demo.ino │ └── SparkFun_SerialLCD_Demo │ │ └── SparkFun_SerialLCD_Demo.ino ├── keywords.txt ├── library.json ├── library.properties └── src │ ├── Canbus.cpp │ ├── Canbus.h │ ├── defaults.h │ ├── global.h │ ├── mcp2515.c │ ├── mcp2515.h │ └── mcp2515_defs.h ├── SparkFun_MPU-9250-DMP_Arduino_Library ├── LICENSE.md ├── README.md ├── examples │ ├── MPU9250_Basic │ │ └── MPU9250_Basic.ino │ ├── MPU9250_Basic_Interrupt │ │ └── MPU9250_Basic_Interrupt.ino │ ├── MPU9250_DMP_Gyro_Cal │ │ └── MPU9250_DMP_Gyro_Cal.ino │ ├── MPU9250_DMP_Orientation │ │ └── MPU9250_DMP_Orientation.ino │ ├── MPU9250_DMP_Pedometer │ │ └── MPU9250_DMP_Pedometer.ino │ ├── MPU9250_DMP_Quaternion │ │ └── MPU9250_DMP_Quaternion.ino │ ├── MPU9250_DMP_Tap │ │ └── MPU9250_DMP_Tap.ino │ └── MPU9250_FIFO_Basic │ │ └── MPU9250_FIFO_Basic.ino ├── keywords.txt ├── library.properties └── src │ ├── MPU9250_RegisterMap.h │ ├── SparkFunMPU9250-DMP.cpp │ ├── SparkFunMPU9250-DMP.h │ └── util │ ├── MPU9250_RegisterMap.h │ ├── arduino_mpu9250_clk.c │ ├── arduino_mpu9250_clk.h │ ├── arduino_mpu9250_i2c.cpp │ ├── arduino_mpu9250_i2c.h │ ├── arduino_mpu9250_log.cpp │ ├── arduino_mpu9250_log.h │ ├── dmpKey.h │ ├── dmpmap.h │ ├── inv_mpu.c │ ├── inv_mpu.h │ ├── inv_mpu_dmp_motion_driver.c │ └── inv_mpu_dmp_motion_driver.h ├── Time ├── DateStrings.cpp ├── Readme.md ├── Time.cpp ├── Time.h ├── TimeLib.h ├── docs │ └── issue_template.md ├── examples │ ├── Processing │ │ └── SyncArduinoClock │ │ │ ├── SyncArduinoClock.pde │ │ │ └── readme.txt │ ├── TimeArduinoDue │ │ └── TimeArduinoDue.ino │ ├── TimeGPS │ │ └── TimeGPS.ino │ ├── TimeNTP │ │ └── TimeNTP.ino │ ├── TimeNTP_ENC28J60 │ │ └── TimeNTP_ENC28J60.ino │ ├── TimeNTP_ESP8266WiFi │ │ └── TimeNTP_ESP8266WiFi.ino │ ├── TimeRTC │ │ └── TimeRTC.ino │ ├── TimeRTCLog │ │ └── TimeRTCLog.ino │ ├── TimeRTCSet │ │ └── TimeRTCSet.ino │ ├── TimeSerial │ │ └── TimeSerial.ino │ ├── TimeSerialDateStrings │ │ └── TimeSerialDateStrings.ino │ └── TimeTeensy3 │ │ └── TimeTeensy3.ino ├── keywords.txt ├── library.json └── library.properties ├── TimeAlarms ├── TimeAlarms.cpp ├── TimeAlarms.h ├── examples │ └── TimeAlarmExample │ │ └── TimeAlarmExample.ino ├── keywords.txt ├── library.json ├── library.properties └── readme.txt ├── TimerOne ├── README.md ├── TimerOne.cpp ├── TimerOne.h ├── config │ └── known_16bit_timers.h ├── examples │ ├── FanSpeed │ │ └── FanSpeed.pde │ └── Interrupt │ │ └── Interrupt.pde ├── keywords.txt ├── library.json └── library.properties ├── TinyEKF ├── .gitignore ├── Doxyfile ├── LICENSE.md ├── Makefile ├── README.md ├── TinyEKF.h ├── examples │ ├── Benchmark │ │ ├── .gitignore │ │ ├── Benchmark.ino │ │ ├── Makefile │ │ └── results.csv │ ├── Makefile │ ├── SensorFusion │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── SensorFusion.ino │ │ └── ekfplot.py │ ├── gps.csv │ ├── gps_ekf.c │ └── tinyekf_config.h ├── python │ ├── altitude_fuser.py │ ├── kalman_mousetracker.py │ ├── setup.py │ └── tinyekf │ │ └── __init__.py ├── tiny_ekf.c ├── tiny_ekf.h └── tiny_ekf_struct.h ├── TinyGPS ├── Examples │ ├── simple_test │ │ └── simple_test.pde │ ├── static_test │ │ └── static_test.pde │ └── test_with_gps_device │ │ └── test_with_gps_device.pde ├── TinyGPS.cpp ├── TinyGPS.h └── keywords.txt ├── TinyGPSPlus ├── TinyGPS++.cpp ├── TinyGPS++.h ├── examples │ ├── BasicExample │ │ └── BasicExample.ino │ ├── DeviceExample │ │ └── DeviceExample.ino │ ├── FullExample │ │ └── FullExample.ino │ ├── KitchenSink │ │ └── KitchenSink.ino │ ├── SatElevTracker │ │ ├── SatElevTracker.ino │ │ └── sample_satellite_elevation_log.txt │ ├── SatelliteTracker │ │ └── SatelliteTracker.ino │ └── UsingCustomFields │ │ └── UsingCustomFields.ino ├── keywords.txt └── library.json └── bitlash ├── .gitignore ├── LICENSE ├── Procfile ├── README-TINY.md ├── README-UNIX.md ├── README.md ├── TODO-BITLASH ├── bitlash.cpp ├── bitlash.h ├── bitlashcode ├── bitlash-one-liners ├── bloader.py ├── elevator.btl ├── elevator2.btl ├── hello.btl ├── ledbargraph.btl ├── ledin.btl ├── memdump ├── midi.btl ├── morse.btl ├── servosequence.btl ├── trafficlight.btl ├── trafficlight2.btl └── vars ├── doc ├── Architecture of Bitlash for Arduino.jpg └── Architecture of Bitlash for Arduino.odg ├── examples ├── BitlashRedisClient │ └── BitlashRedisClient.pde ├── BitlashWebServer │ └── BitlashWebServer.ino ├── bitlash_rf │ ├── TODO_BITLASH_RF │ ├── bitlash_rf.h │ ├── bitlash_rf.pde │ ├── bitlashcode │ │ └── rfm22 │ ├── doc │ │ ├── Bitlash_RF Architecture Diagram.jpg │ │ ├── Bitlash_RF Architecture Diagram.odg │ │ ├── bitlash_rf.txt │ │ ├── radio-rfm22regs.txt │ │ └── rfm-22-calculations.ods │ ├── pkt.cpp │ ├── pkt.h │ ├── radio_rf12.cpp │ ├── radio_rfm22.cpp │ └── radio_virtualwire.cpp ├── bitlashclock │ └── bitlashclock.pde ├── bitlashdemo │ └── bitlashdemo.pde ├── bitlashsd │ └── bitlashsd.pde ├── bitlashtelnet │ └── bitlashtelnet.pde ├── bitlashtelnet2 │ └── bitlashtelnet2.pde ├── blinkm │ ├── BlinkM_funcs.h │ └── blinkm.ino ├── commander │ └── commander.pde ├── ethernetcommander │ └── ethernetcommander.ino ├── loudbitlash │ └── loudbitlash.pde ├── morse │ └── morse.pde ├── morse2 │ ├── doc │ │ └── morseio.c │ └── morse2.pde ├── rollover │ └── rollover.ino ├── seriallcd │ └── seriallcd.ino ├── servo │ └── servo.pde ├── spi │ └── spi.pde ├── tonedemo │ └── tonedemo.pde └── userfunctions │ └── userfunctions.pde ├── index.js ├── package.json ├── src ├── Makefile ├── bin │ ├── bitlash │ ├── bitlash-linux-32-heroku │ ├── bitlash-linux-32-ubuntu │ └── bitlash-osx-64 ├── bitlash-api.c ├── bitlash-builtins.c ├── bitlash-cmdline.c ├── bitlash-eeprom.c ├── bitlash-error.c ├── bitlash-functions.c ├── bitlash-instream.c ├── bitlash-interpreter.c ├── bitlash-parser.c ├── bitlash-serial.c ├── bitlash-taskmgr.c ├── bitlash-unix-file.c ├── bitlash-unix.c ├── bitlash.h ├── conio.h ├── eeprom.c └── mygetch.c └── test └── bitlash-test.py /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /AccelStepper/LICENSE: -------------------------------------------------------------------------------- 1 | This software is Copyright (C) 2008 Mike McCauley. Use is subject to license 2 | conditions. The main licensing options available are GPL V2 or Commercial: 3 | 4 | Open Source Licensing GPL V2 5 | 6 | This is the appropriate option if you want to share the source code of your 7 | application with everyone you distribute it to, and you also want to give them 8 | the right to share who uses it. If you wish to use this software under Open 9 | Source Licensing, you must contribute all your source code to the open source 10 | community in accordance with the GPL Version 2 when your application is 11 | distributed. See http://www.gnu.org/copyleft/gpl.html 12 | 13 | Commercial Licensing 14 | 15 | This is the appropriate option if you are creating proprietary applications 16 | and you are not prepared to distribute and share the source code of your 17 | application. Contact info@open.com.au for details. 18 | -------------------------------------------------------------------------------- /AccelStepper/examples/Blocking/Blocking.pde: -------------------------------------------------------------------------------- 1 | // Blocking.pde 2 | // -*- mode: C++ -*- 3 | // 4 | // Shows how to use the blocking call runToNewPosition 5 | // Which sets a new target position and then waits until the stepper has 6 | // achieved it. 7 | // 8 | // Copyright (C) 2009 Mike McCauley 9 | // $Id: Blocking.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $ 10 | 11 | #include 12 | 13 | // Define a stepper and the pins it will use 14 | AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5 15 | 16 | void setup() 17 | { 18 | stepper.setMaxSpeed(200.0); 19 | stepper.setAcceleration(100.0); 20 | } 21 | 22 | void loop() 23 | { 24 | stepper.runToNewPosition(0); 25 | stepper.runToNewPosition(500); 26 | stepper.runToNewPosition(100); 27 | stepper.runToNewPosition(120); 28 | } 29 | -------------------------------------------------------------------------------- /AccelStepper/examples/Bounce/Bounce.pde: -------------------------------------------------------------------------------- 1 | // Bounce.pde 2 | // -*- mode: C++ -*- 3 | // 4 | // Make a single stepper bounce from one limit to another 5 | // 6 | // Copyright (C) 2012 Mike McCauley 7 | // $Id: Random.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $ 8 | 9 | #include 10 | 11 | // Define a stepper and the pins it will use 12 | AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5 13 | 14 | void setup() 15 | { 16 | // Change these to suit your stepper if you want 17 | stepper.setMaxSpeed(100); 18 | stepper.setAcceleration(20); 19 | stepper.moveTo(500); 20 | } 21 | 22 | void loop() 23 | { 24 | // If at the end of travel go to the other end 25 | if (stepper.distanceToGo() == 0) 26 | stepper.moveTo(-stepper.currentPosition()); 27 | 28 | stepper.run(); 29 | } 30 | -------------------------------------------------------------------------------- /AccelStepper/examples/ConstantSpeed/ConstantSpeed.pde: -------------------------------------------------------------------------------- 1 | // ConstantSpeed.pde 2 | // -*- mode: C++ -*- 3 | // 4 | // Shows how to run AccelStepper in the simplest, 5 | // fixed speed mode with no accelerations 6 | /// \author Mike McCauley (mikem@airspayce.com) 7 | // Copyright (C) 2009 Mike McCauley 8 | // $Id: ConstantSpeed.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $ 9 | 10 | #include 11 | 12 | AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5 13 | 14 | void setup() 15 | { 16 | stepper.setMaxSpeed(1000); 17 | stepper.setSpeed(50); 18 | } 19 | 20 | void loop() 21 | { 22 | stepper.runSpeed(); 23 | } 24 | -------------------------------------------------------------------------------- /AccelStepper/examples/Overshoot/Overshoot.pde: -------------------------------------------------------------------------------- 1 | // Overshoot.pde 2 | // -*- mode: C++ -*- 3 | // 4 | // Check overshoot handling 5 | // which sets a new target position and then waits until the stepper has 6 | // achieved it. This is used for testing the handling of overshoots 7 | // 8 | // Copyright (C) 2009 Mike McCauley 9 | // $Id: Overshoot.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $ 10 | 11 | #include 12 | 13 | // Define a stepper and the pins it will use 14 | AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5 15 | 16 | void setup() 17 | { 18 | stepper.setMaxSpeed(150); 19 | stepper.setAcceleration(100); 20 | } 21 | 22 | void loop() 23 | { 24 | stepper.moveTo(500); 25 | while (stepper.currentPosition() != 300) // Full speed up to 300 26 | stepper.run(); 27 | stepper.runToNewPosition(0); // Cause an overshoot then back to 0 28 | } 29 | -------------------------------------------------------------------------------- /AccelStepper/examples/Random/Random.pde: -------------------------------------------------------------------------------- 1 | // Random.pde 2 | // -*- mode: C++ -*- 3 | // 4 | // Make a single stepper perform random changes in speed, position and acceleration 5 | // 6 | // Copyright (C) 2009 Mike McCauley 7 | // $Id: Random.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $ 8 | 9 | #include 10 | 11 | // Define a stepper and the pins it will use 12 | AccelStepper stepper; // Defaults to AccelStepper::FULL4WIRE (4 pins) on 2, 3, 4, 5 13 | 14 | void setup() 15 | { 16 | } 17 | 18 | void loop() 19 | { 20 | if (stepper.distanceToGo() == 0) 21 | { 22 | // Random change to speed, position and acceleration 23 | // Make sure we dont get 0 speed or accelerations 24 | delay(1000); 25 | stepper.moveTo(rand() % 200); 26 | stepper.setMaxSpeed((rand() % 200) + 1); 27 | stepper.setAcceleration((rand() % 200) + 1); 28 | } 29 | stepper.run(); 30 | } 31 | -------------------------------------------------------------------------------- /AccelStepper/extras/doc/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/AccelStepper/extras/doc/doxygen.png -------------------------------------------------------------------------------- /AccelStepper/extras/doc/tab_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/AccelStepper/extras/doc/tab_b.gif -------------------------------------------------------------------------------- /AccelStepper/extras/doc/tab_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/AccelStepper/extras/doc/tab_l.gif -------------------------------------------------------------------------------- /AccelStepper/extras/doc/tab_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/AccelStepper/extras/doc/tab_r.gif -------------------------------------------------------------------------------- /AccelStepper/library.properties: -------------------------------------------------------------------------------- 1 | name=AccelStepper 2 | version=1.59 3 | author=Mike McCauley 4 | maintainer=Patrick Wasp 5 | sentence=Allows Arduino boards to control a variety of stepper motors. 6 | paragraph=Provides an object-oriented interface for 2, 3 or 4 pin stepper motors and motor drivers. 7 | category=Device Control 8 | url=http://www.airspayce.com/mikem/arduino/AccelStepper/ 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_ADXL343/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit ADXL343 2 | version=1.2.0 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Unified driver for the ADXL343 Accelerometer 6 | paragraph=Unified driver for the ADXL343 Accelerometer 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_ADXL343 9 | architectures=* 10 | depends=Adafruit Unified Sensor 11 | -------------------------------------------------------------------------------- /Adafruit_AM2315/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit AM2315 2 | version=2.1.0 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Library code for AM2315 sensors 6 | paragraph=Library code for AM2315 sensors 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_AM2315 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_BME680_Library/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit BME680 Library 2 | version=1.0.7 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Arduino library for BME680 sensors. 6 | paragraph=Arduino library for BME680 humidity and pressure sensors. 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_BME680 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_BNO055/OBJLoader/OBJLoader.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/Adafruit_BNO055/OBJLoader/OBJLoader.zip -------------------------------------------------------------------------------- /Adafruit_BNO055/assets/board.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/Adafruit_BNO055/assets/board.jpg -------------------------------------------------------------------------------- /Adafruit_BNO055/examples_processing/cuberotate/data/bunny.mtl: -------------------------------------------------------------------------------- 1 | # 3ds Max Wavefront OBJ Exporter v0.94b - (c)2007 guruware 2 | # File Created: 04.07.2010 10:41:39 3 | 4 | newmtl Body 5 | Ns 32 6 | d 1 7 | Tr 1 8 | Tf 1 1 1 9 | illum 2 10 | Ka 0.0000 0.0000 0.0000 11 | Kd 0.7412 0.4784 0.4765 12 | Ks 0.3500 0.3500 0.6500 13 | 14 | -------------------------------------------------------------------------------- /Adafruit_BNO055/examples_processing/cuberotate/serialconfig.txt: -------------------------------------------------------------------------------- 1 | /dev/tty.usbmodem141121 2 | -------------------------------------------------------------------------------- /Adafruit_BNO055/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit BNO055 2 | version=1.3.0 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Library for the Adafruit BNO055 Absolute Orientation Sensor. 6 | paragraph=Designed specifically to work with the Adafruit BNO055 Breakout, and is based on Adafruit's Unified Sensor Library. 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_BNO055 9 | architectures=* 10 | depends=Adafruit Unified Sensor 11 | -------------------------------------------------------------------------------- /Adafruit_BusIO/Adafruit_I2CRegister.h: -------------------------------------------------------------------------------- 1 | #include "Adafruit_BusIO_Register.h" 2 | #ifndef _ADAFRUIT_I2C_REGISTER_H_ 3 | #define _ADAFRUIT_I2C_REGISTER_H_ 4 | 5 | typedef Adafruit_BusIO_Register Adafruit_I2CRegister; 6 | typedef Adafruit_BusIO_RegisterBits Adafruit_I2CRegisterBits; 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /Adafruit_BusIO/README.md: -------------------------------------------------------------------------------- 1 | # Adafruit Bus IO Library [![Build Status](https://github.com/adafruit/Adafruit_BusIO/workflows/Arduino%20Library%20CI/badge.svg)](https://github.com/adafruit/Adafruit_BusIO/actions) 2 | 3 | 4 | This is a helper libary to abstract away I2C & SPI transactions and registers 5 | 6 | Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! 7 | 8 | MIT license, all text above must be included in any redistribution 9 | -------------------------------------------------------------------------------- /Adafruit_BusIO/examples/i2c_address_detect/i2c_address_detect.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | Adafruit_I2CDevice i2c_dev = Adafruit_I2CDevice(0x10); 4 | 5 | void setup() { 6 | while (!Serial) { delay(10); } 7 | Serial.begin(115200); 8 | Serial.println("I2C address detection test"); 9 | 10 | if (!i2c_dev.begin()) { 11 | Serial.print("Did not find device at 0x"); 12 | Serial.println(i2c_dev.address(), HEX); 13 | while (1); 14 | } 15 | Serial.print("Device found on address 0x"); 16 | Serial.println(i2c_dev.address(), HEX); 17 | } 18 | 19 | void loop() { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Adafruit_BusIO/examples/spi_modetest/spi_modetest.ino: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define SPIDEVICE_CS 10 4 | Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS, 100000, SPI_BITORDER_MSBFIRST, SPI_MODE1); 5 | //Adafruit_SPIDevice spi_dev = Adafruit_SPIDevice(SPIDEVICE_CS, 13, 12, 11, 100000, SPI_BITORDER_MSBFIRST, SPI_MODE1); 6 | 7 | 8 | void setup() { 9 | while (!Serial) { delay(10); } 10 | Serial.begin(115200); 11 | Serial.println("SPI device mode test"); 12 | 13 | if (!spi_dev.begin()) { 14 | Serial.println("Could not initialize SPI device"); 15 | while (1); 16 | } 17 | } 18 | 19 | void loop() { 20 | Serial.println("\n\nTransfer test"); 21 | for (uint16_t x=0; x<=0xFF; x++) { 22 | uint8_t i = x; 23 | Serial.print("0x"); Serial.print(i, HEX); 24 | spi_dev.read(&i, 1, i); 25 | Serial.print("/"); Serial.print(i, HEX); 26 | Serial.print(", "); 27 | delay(25); 28 | } 29 | } -------------------------------------------------------------------------------- /Adafruit_BusIO/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit BusIO 2 | version=1.3.2 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=This is a library for abstracting away UART, I2C and SPI interfacing 6 | paragraph=This is a library for abstracting away UART, I2C and SPI interfacing 7 | category=Signal Input/Output 8 | url=https://github.com/adafruit/Adafruit_BusIO 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_ESP8266/README.md: -------------------------------------------------------------------------------- 1 | Adafruit_ESP8266 2 | ================ 3 | 4 | Example code for ESP8266 chipset 5 | -------------------------------------------------------------------------------- /Adafruit_ESP8266/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit ESP8266 2 | version=1.0.0 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Example code for ESP8266 chipset 6 | paragraph=Example code for ESP8266 chipset 7 | category=Communication 8 | url=https://github.com/adafruit/Adafruit_ESP8266 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_GFX_Library/Adafruit_SPITFT_Macros.h: -------------------------------------------------------------------------------- 1 | // THIS FILE INTENTIONALLY LEFT BLANK. 2 | 3 | // Macros previously #defined here have been made into (mostly) inline 4 | // functions in the Adafruit_SPITFT class. Other libraries might still 5 | // contain code trying to #include this header file, so until everything's 6 | // updated this file still exists (but doing nothing) to avoid trouble. 7 | -------------------------------------------------------------------------------- /Adafruit_GFX_Library/fontconvert/Makefile: -------------------------------------------------------------------------------- 1 | all: fontconvert 2 | 3 | CC = gcc 4 | CFLAGS = -Wall -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/include 5 | LIBS = -lfreetype 6 | 7 | fontconvert: fontconvert.c 8 | $(CC) $(CFLAGS) $< $(LIBS) -o $@ 9 | strip $@ 10 | 11 | clean: 12 | rm -f fontconvert 13 | -------------------------------------------------------------------------------- /Adafruit_GFX_Library/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit GFX Library 2 | version=1.8.4 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Adafruit GFX graphics core library, this is the 'core' class that all our other graphics libraries derive from. 6 | paragraph=Install this library in addition to the display library for your hardware. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit-GFX-Library 9 | architectures=* 10 | depends=Adafruit BusIO 11 | -------------------------------------------------------------------------------- /Adafruit_HTU21DF_Library/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit HTU21DF Library 2 | version=1.0.5 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Arduino library for the HTU21D-F sensors in the Adafruit shop 6 | paragraph=Arduino library for the HTU21D-F sensors in the Adafruit shop 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_HTU21DF_Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_ILI9341/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit ILI9341 2 | version=1.5.5 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Library for Adafruit ILI9341 displays 6 | paragraph=Library for Adafruit ILI9341 displays 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit_ILI9341 9 | architectures=* 10 | depends=Adafruit GFX Library, Adafruit STMPE610, Adafruit TouchScreen 11 | -------------------------------------------------------------------------------- /Adafruit_MQTT_Library/examples/mqtt_arbitrary_data/python_subscriber/mqtt_figure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/Adafruit_MQTT_Library/examples/mqtt_arbitrary_data/python_subscriber/mqtt_figure.png -------------------------------------------------------------------------------- /Adafruit_MQTT_Library/examples/mqtt_arbitrary_data/python_subscriber/requirements.txt: -------------------------------------------------------------------------------- 1 | paho-mqtt>=1.1 2 | -------------------------------------------------------------------------------- /Adafruit_MQTT_Library/keywords.txt: -------------------------------------------------------------------------------- 1 | Adafruit_MQTT KEYWORD1 2 | Adafruit_MQTT_FONA KEYWORD1 3 | Adafruit_MQTT_Client KEYWORD1 4 | Adafruit_MQTT_Publish KEYWORD1 5 | Adafruit_MQTT_Subscribe KEYWORD1 6 | connect KEYWORD2 7 | connectErrorString KEYWORD2 8 | disconnect KEYWORD2 9 | connected KEYWORD2 10 | will KEYWORD2 11 | publish KEYWORD2 12 | subscribe KEYWORD2 13 | unsubscribe KEYWORD2 14 | readSubscription KEYWORD2 15 | ping KEYWORD2 16 | setCallback KEYWORD2 17 | connectServer KEYWORD2 18 | disconnectServer KEYWORD2 19 | readPacket KEYWORD2 20 | sendPacket KEYWORD2 21 | -------------------------------------------------------------------------------- /Adafruit_MQTT_Library/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit MQTT Library 2 | version=1.0.3 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=MQTT library that supports the FONA, ESP8266, Yun, and generic Arduino Client hardware. 6 | paragraph=Simple MQTT library that supports the bare minimum to publish and subscribe to topics. 7 | category=Communication 8 | url=https://github.com/adafruit/Adafruit_MQTT_Library 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_STMPE610/assets/board.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/Adafruit_STMPE610/assets/board.jpg -------------------------------------------------------------------------------- /Adafruit_STMPE610/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit STMPE610 2 | version=1.1.2 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Arduino library for STMPE610/811 resistive touch screen controllers 6 | paragraph=Arduino library for STMPE610/811 resistive touch screen controllers 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit_STMPE610 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_Sensor/Adafruit_Sensor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/Adafruit_Sensor/Adafruit_Sensor.h -------------------------------------------------------------------------------- /Adafruit_Sensor/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit Unified Sensor 2 | version=1.0.2 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Required for all Adafruit Unified Sensor based libraries. 6 | paragraph=A unified sensor abstraction layer used by many Adafruit sensor libraries. 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_Sensor 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_TSL2561/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit TSL2561 2 | version=1.1.0 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Unified sensor driver for Adafruit's TSL2561 breakouts 6 | paragraph=Unified sensor driver for Adafruit's TSL2561 breakouts 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_TSL2561 9 | architectures=* 10 | depends=Adafruit Unified Sensor 11 | -------------------------------------------------------------------------------- /Adafruit_TouchScreen/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit TouchScreen 2 | version=1.1.0 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Adafruit TouchScreen display library. 6 | paragraph=Adafruit TouchScreen display library. 7 | category=Display 8 | url=https://github.com/adafruit/Adafruit_TouchScreen 9 | architectures=* 10 | -------------------------------------------------------------------------------- /Adafruit_Unified_Sensor/library.properties: -------------------------------------------------------------------------------- 1 | name=Adafruit Unified Sensor 2 | version=1.1.3 3 | author=Adafruit 4 | maintainer=Adafruit 5 | sentence=Required for all Adafruit Unified Sensor based libraries. 6 | paragraph=A unified sensor abstraction layer used by many Adafruit sensor libraries. 7 | category=Sensors 8 | url=https://github.com/adafruit/Adafruit_Sensor 9 | architectures=* 10 | includes=Adafruit_Sensor.h 11 | depends=Adafruit ADXL343 12 | -------------------------------------------------------------------------------- /ArduinoJson/ArduinoJson.h: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include "src/ArduinoJson.h" 6 | -------------------------------------------------------------------------------- /ArduinoJson/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | cmake_minimum_required(VERSION 3.0) 6 | 7 | project(ArduinoJson VERSION 6.15.1) 8 | 9 | if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) 10 | include(CTest) 11 | endif() 12 | 13 | add_subdirectory(src) 14 | 15 | if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING) 16 | include(extras/CompileOptions.cmake) 17 | add_subdirectory(extras/tests) 18 | add_subdirectory(extras/fuzzing) 19 | endif() 20 | -------------------------------------------------------------------------------- /ArduinoJson/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution to ArduinoJson 2 | 3 | First, thank you for taking the time to contribute to this project. 4 | 5 | You can submit changes via GitHub Pull Requests. 6 | 7 | Please: 8 | 9 | 1. Unit test every change in behavior 10 | 2. Use clang-format in "file" mode to format the code 11 | 3. Consider using the Continuous Integration (Travis and AppVeyor) 12 | -------------------------------------------------------------------------------- /ArduinoJson/component.mk: -------------------------------------------------------------------------------- 1 | COMPONENT_ADD_INCLUDEDIRS := src 2 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ArduinoJsonConfig.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | 3 | include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") 4 | check_required_components("@PROJECT_NAME@") 5 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ci/arduino.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16 4 | sleep 3 5 | export DISPLAY=:1.0 6 | 7 | mkdir -p /tmp/arduino 8 | curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tar.xz | tar xJ -C /tmp/arduino --strip 1 || 9 | curl -sS http://downloads.arduino.cc/arduino-$VERSION-linux64.tgz | tar xz -C /tmp/arduino --strip 1 10 | export PATH=$PATH:/tmp/arduino/ 11 | 12 | if [[ "$BOARD" =~ "arduino:samd:" ]]; then 13 | arduino --install-boards arduino:samd 14 | fi 15 | 16 | ln -s $PWD /tmp/arduino/libraries/ArduinoJson 17 | 18 | for EXAMPLE in $PWD/examples/*/*.ino; do 19 | arduino --verify --board $BOARD $EXAMPLE 20 | done 21 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ci/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | export CC="$_CC" 4 | export CXX="$_CXX" 5 | 6 | cmake -DCMAKE_BUILD_TYPE=Release . 7 | cmake --build . 8 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ci/coverage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eux 2 | 3 | cmake -DCOVERAGE=true . 4 | make 5 | make test 6 | 7 | pip install --user cpp-coveralls 'requests[security]' 8 | pwd 9 | coveralls --include 'src' --gcov-options '\-lp' 10 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ci/fuzz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | ROOT_DIR=$(dirname $0)/../../ 4 | INCLUDE_DIR=${ROOT_DIR}/src/ 5 | FUZZING_DIR=${ROOT_DIR}/extras/fuzzing/ 6 | CXXFLAGS="-g -fprofile-instr-generate -fcoverage-mapping -fsanitize=address,undefined,fuzzer -fno-sanitize-recover=all" 7 | 8 | fuzz() { 9 | NAME="$1" 10 | FUZZER="${NAME}_fuzzer" 11 | FUZZER_CPP="${FUZZING_DIR}/${NAME}_fuzzer.cpp" 12 | CORPUS_DIR="${FUZZING_DIR}/${NAME}_corpus" 13 | SEED_CORPUS_DIR="${FUZZING_DIR}/${NAME}_seed_corpus" 14 | 15 | clang++-${CLANG} ${CXXFLAGS} -o ${FUZZER} -I$INCLUDE_DIR ${FUZZER_CPP} 16 | 17 | export ASAN_OPTIONS="detect_leaks=0" 18 | export LLVM_PROFILE_FILE="${FUZZER}.profraw" 19 | ./${FUZZER} "$CORPUS_DIR" "$SEED_CORPUS_DIR" -max_total_time=30 -timeout=1 20 | 21 | llvm-profdata-${CLANG} merge -sparse ${LLVM_PROFILE_FILE} -o ${FUZZER}.profdata 22 | llvm-cov-${CLANG} report ./${FUZZER} -instr-profile=${FUZZER}.profdata 23 | } 24 | 25 | fuzz json 26 | fuzz msgpack 27 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ci/platformio.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -eux 2 | 3 | pip install --user platformio 4 | 5 | case $BOARD in 6 | uno) 7 | platformio lib install 868 # SD library 8 | platformio lib install 872 # Ethernet library 9 | ;; 10 | esp01) 11 | platformio lib uninstall 161 || true 12 | platformio lib uninstall 868 || true 13 | platformio lib uninstall 872 || true 14 | ;; 15 | esac 16 | 17 | for EXAMPLE in $PWD/examples/*/*.ino; 18 | do 19 | platformio ci $EXAMPLE -l '.' -b $BOARD 20 | done 21 | -------------------------------------------------------------------------------- /ArduinoJson/extras/ci/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | 3 | export CC="$_CC" 4 | export CXX="$_CXX" 5 | 6 | [ -n "$SANITIZE" ] && export CXXFLAGS="-fsanitize=$SANITIZE" 7 | 8 | cmake -DCMAKE_BUILD_TYPE=Debug . 9 | cmake --build . 10 | ctest --output-on-failure . 11 | -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | if(MSVC) 6 | add_compile_options(-D_CRT_SECURE_NO_WARNINGS) 7 | endif() 8 | 9 | add_executable(msgpack_fuzzer 10 | msgpack_fuzzer.cpp 11 | fuzzer_main.cpp 12 | ) 13 | target_link_libraries(msgpack_fuzzer 14 | ArduinoJson 15 | ) 16 | 17 | add_executable(json_fuzzer 18 | json_fuzzer.cpp 19 | fuzzer_main.cpp 20 | ) 21 | target_link_libraries(json_fuzzer 22 | ArduinoJson 23 | ) 24 | -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/Makefile: -------------------------------------------------------------------------------- 1 | # CAUTION: this file is invoked by https://github.com/google/oss-fuzz 2 | 3 | CXXFLAGS += -I../../src -DARDUINOJSON_DEBUG=1 4 | 5 | all: \ 6 | $(OUT)/json_fuzzer \ 7 | $(OUT)/json_fuzzer_seed_corpus.zip \ 8 | $(OUT)/json_fuzzer.options \ 9 | $(OUT)/msgpack_fuzzer \ 10 | $(OUT)/msgpack_fuzzer_seed_corpus.zip \ 11 | $(OUT)/msgpack_fuzzer.options 12 | 13 | $(OUT)/%_fuzzer: %_fuzzer.cpp $(shell find ../../src -type f) 14 | $(CXX) $(CXXFLAGS) $< -o$@ $(LIB_FUZZING_ENGINE) 15 | 16 | $(OUT)/%_fuzzer_seed_corpus.zip: %_seed_corpus/* 17 | zip -j $@ $? 18 | 19 | $(OUT)/%_fuzzer.options: 20 | @echo "[libfuzzer]" > $@ 21 | @echo "max_len = 256" >> $@ 22 | @echo "timeout = 10" >> $@ 23 | -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_fuzzer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 4 | DynamicJsonDocument doc(4096); 5 | DeserializationError error = deserializeJson(doc, data, size); 6 | if (!error) { 7 | std::string json; 8 | serializeJson(doc, json); 9 | } 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/Comments.json: -------------------------------------------------------------------------------- 1 | //comment 2 | /*comment*/ 3 | [ //comment 4 | /*comment*/"comment"/*comment*/,//comment 5 | /*comment*/{//comment 6 | /* comment*/"key"//comment 7 | : //comment 8 | "value"//comment 9 | }/*comment*/ 10 | ]//comment -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/EmptyArray.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/EmptyObject.json: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/ExcessiveNesting.json: -------------------------------------------------------------------------------- 1 | [1,[2,[3,[4,[5,[6,[7,[8,[9,[10,[11,[12,[13,[14,[15,[16,[17,[18,[19,[20,[21,[22,[23,[24,[25,[26,[27,[28,[29,[30,[31,[32,[33,[34,[35,[36,[37,[38,[39,[40,[41,[42,[43,[44,[45,[46,[47,[48,[49,[50,[51,[52,[53,[54,[55,[56,[57,[58,[59,[60,[61,[62,[63,[64,[65,[66,[67,[68,[69,[70,[71,[72,[73,[74,[75,[76,[77,[78,[79,[80,[81,[82,[83,[84,[85,[86,[87,[88,[89,[90,[91,[92,[93,[94,[95,[96,[97,[98,[99,[100,[101,[102,[103,[104,[105,[106,[107,[108,[109,[110,[111,[112,[113,[114,[115,[116,[117,[118,[119,[120]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/IntegerOverflow.json: -------------------------------------------------------------------------------- 1 | 9720730739393920739 2 | -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/Numbers.json: -------------------------------------------------------------------------------- 1 | [ 2 | 123, 3 | -123, 4 | 123.456, 5 | -123.456, 6 | 12e34, 7 | 12e-34, 8 | 12e+34, 9 | 12E34, 10 | 12E-34, 11 | 12E+34, 12 | 12.34e56, 13 | 12.34e-56, 14 | 12.34e+56, 15 | 12.34E56, 16 | 12.34E-56, 17 | 12.34E+56, 18 | NaN, 19 | -NaN, 20 | +NaN, 21 | Infinity, 22 | +Infinity, 23 | -Infinity 24 | ] -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/json_seed_corpus/Strings.json: -------------------------------------------------------------------------------- 1 | [ 2 | "hello", 3 | 'hello', 4 | hello, 5 | {"hello":"world"}, 6 | {'hello':'world'}, 7 | {hello:world} 8 | ] -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_fuzzer.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { 4 | DynamicJsonDocument doc(4096); 5 | DeserializationError error = deserializeMsgPack(doc, data, size); 6 | if (!error) { 7 | std::string json; 8 | serializeMsgPack(doc, json); 9 | } 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/array16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/array16 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/array32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/array32 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/false: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixarray: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixarray -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixint_negative: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixint_positive: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixmap -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixstr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/fixstr -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/float32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/float32 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/float64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/float64 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int16 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int32 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int64 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/int8 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/map16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/map16 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/map32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/map32 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/nil: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/nil -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/str16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/str16 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/str32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/str32 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/str8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/str8 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/true: -------------------------------------------------------------------------------- 1 | � -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint16: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint16 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint32: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint32 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint64: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint64 -------------------------------------------------------------------------------- /ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericbarch/arduino-libraries/8d1255753ceac03ed542458a8daf6231e7b7b7e9/ArduinoJson/extras/fuzzing/msgpack_seed_corpus/uint8 -------------------------------------------------------------------------------- /ArduinoJson/extras/scripts/build-arduino-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | TAG=$(git describe) 4 | OUTPUT="ArduinoJson-$TAG.zip" 5 | 6 | cd $(dirname $0)/../../.. 7 | 8 | # remove existing file 9 | rm -f $OUTPUT 10 | 11 | # create zip 12 | 7z a $OUTPUT \ 13 | ArduinoJson/CHANGELOG.md \ 14 | ArduinoJson/examples \ 15 | ArduinoJson/src \ 16 | ArduinoJson/keywords.txt \ 17 | ArduinoJson/library.properties \ 18 | ArduinoJson/LICENSE.md \ 19 | ArduinoJson/README.md \ 20 | ArduinoJson/ArduinoJson.h 21 | -------------------------------------------------------------------------------- /ArduinoJson/extras/scripts/publish-particle-library.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | SOURCE_DIR="$(dirname "$0")/../.." 6 | WORK_DIR=$(mktemp -d) 7 | trap 'rm -rf "$WORK_DIR"' EXIT 8 | 9 | cp "$SOURCE_DIR/README.md" "$WORK_DIR/README.md" 10 | cp "$SOURCE_DIR/CHANGELOG.md" "$WORK_DIR/CHANGELOG.md" 11 | cp "$SOURCE_DIR/library.properties" "$WORK_DIR/library.properties" 12 | cp "$SOURCE_DIR/LICENSE.md" "$WORK_DIR/LICENSE.txt" 13 | cp -r "$SOURCE_DIR/src" "$WORK_DIR/" 14 | cp -r "$SOURCE_DIR/examples" "$WORK_DIR/" 15 | 16 | cd "$WORK_DIR" 17 | particle library upload 18 | particle library publish 19 | -------------------------------------------------------------------------------- /ArduinoJson/extras/scripts/wandbox/publish.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | ARDUINOJSON_H="$1" 6 | 7 | read_string() { 8 | jq --slurp --raw-input '.' "$1" 9 | } 10 | 11 | compile() { 12 | FILE_PATH="$(dirname $0)/$1.cpp" 13 | cat >parameters.json < 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("ElementProxy::add()") { 11 | DynamicJsonDocument doc(4096); 12 | doc.addElement(); 13 | ElementProxy ep = doc[0]; 14 | 15 | SECTION("add(int)") { 16 | ep.add(42); 17 | 18 | REQUIRE(doc.as() == "[[42]]"); 19 | } 20 | 21 | SECTION("add(const char*)") { 22 | ep.add("world"); 23 | 24 | REQUIRE(doc.as() == "[[\"world\"]]"); 25 | } 26 | 27 | SECTION("set(char[])") { 28 | char s[] = "world"; 29 | ep.add(s); 30 | strcpy(s, "!!!!!"); 31 | 32 | REQUIRE(doc.as() == "[[\"world\"]]"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/ElementProxy/clear.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("ElementProxy::clear()") { 11 | DynamicJsonDocument doc(4096); 12 | doc.addElement(); 13 | ElementProxy ep = doc[0]; 14 | 15 | SECTION("size goes back to zero") { 16 | ep.add(42); 17 | ep.clear(); 18 | 19 | REQUIRE(ep.size() == 0); 20 | } 21 | 22 | SECTION("isNull() return true") { 23 | ep.add("hello"); 24 | ep.clear(); 25 | 26 | REQUIRE(ep.isNull() == true); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/ElementProxy/compare.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("ElementProxy::operator==()") { 11 | DynamicJsonDocument doc(4096); 12 | 13 | SECTION("same value") { 14 | doc.add(1); 15 | doc.add(1); 16 | 17 | REQUIRE(doc[0] == doc[1]); 18 | REQUIRE_FALSE(doc[0] != doc[1]); 19 | } 20 | 21 | SECTION("different values") { 22 | doc.add(1); 23 | doc.add(2); 24 | 25 | REQUIRE_FALSE(doc[0] == doc[1]); 26 | REQUIRE(doc[0] != doc[1]); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/ElementProxy/set.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("ElementProxy::set()") { 11 | DynamicJsonDocument doc(4096); 12 | ElementProxy ep = doc[0]; 13 | 14 | SECTION("set(int)") { 15 | ep.set(42); 16 | 17 | REQUIRE(doc.as() == "[42]"); 18 | } 19 | 20 | SECTION("set(const char*)") { 21 | ep.set("world"); 22 | 23 | REQUIRE(doc.as() == "[\"world\"]"); 24 | } 25 | 26 | SECTION("set(char[])") { 27 | char s[] = "world"; 28 | ep.set(s); 29 | strcpy(s, "!!!!!"); 30 | 31 | REQUIRE(doc.as() == "[\"world\"]"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/ElementProxy/size.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("ElementProxy::size()") { 11 | DynamicJsonDocument doc(4096); 12 | doc.addElement(); 13 | ElementProxy ep = doc[0]; 14 | 15 | SECTION("returns 0") { 16 | REQUIRE(ep.size() == 0); 17 | } 18 | 19 | SECTION("as an array, returns 2") { 20 | ep.add(1); 21 | ep.add(2); 22 | REQUIRE(ep.size() == 2); 23 | } 24 | 25 | SECTION("as an object, returns 2") { 26 | ep["a"] = 1; 27 | ep["b"] = 2; 28 | REQUIRE(ep.size() == 2); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/ElementProxy/subscript.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::operator[]") { 11 | DynamicJsonDocument doc(4096); 12 | ElementProxy ep = doc[1]; 13 | 14 | SECTION("set member") { 15 | ep["world"] = 42; 16 | 17 | REQUIRE(doc.as() == "[null,{\"world\":42}]"); 18 | } 19 | 20 | SECTION("set element") { 21 | ep[2] = 42; 22 | 23 | REQUIRE(doc.as() == "[null,[null,null,42]]"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/FailingBuilds/Issue1189.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | 7 | // a function should not be able to get a JsonDocument by value 8 | void f(JsonDocument) {} 9 | 10 | int main() { 11 | DynamicJsonDocument doc(1024); 12 | f(doc); 13 | } 14 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/FailingBuilds/Issue978.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | 7 | struct Stream {}; 8 | 9 | int main() { 10 | Stream* stream = 0; 11 | DynamicJsonDocument doc(1024); 12 | deserializeJson(doc, stream); 13 | } 14 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/FailingBuilds/read_long_long.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #define ARDUINOJSON_USE_LONG_LONG 0 6 | #include 7 | 8 | #if defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ >= 8 9 | #error This test requires sizeof(long) < 8 10 | #endif 11 | 12 | #if !ARDUINOJSON_HAS_LONG_LONG 13 | #error This test requires C++11 14 | #endif 15 | 16 | ARDUINOJSON_ASSERT_INTEGER_TYPE_IS_SUPPORTED(long long) 17 | int main() { 18 | DynamicJsonDocument doc(1024); 19 | doc["dummy"].as(); 20 | } 21 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/FailingBuilds/write_long_long.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #define ARDUINOJSON_USE_LONG_LONG 0 6 | #include 7 | 8 | #if defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ >= 8 9 | #error This test requires sizeof(long) < 8 10 | #endif 11 | 12 | #if !ARDUINOJSON_HAS_LONG_LONG 13 | #error This test requires C++11 14 | #endif 15 | 16 | int main() { 17 | DynamicJsonDocument doc(1024); 18 | doc["dummy"] = static_cast(42); 19 | } 20 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Helpers/CustomReader.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | class CustomReader { 10 | std::stringstream _stream; 11 | 12 | public: 13 | CustomReader(const char* input) : _stream(input) {} 14 | 15 | int read() { 16 | return _stream.get(); 17 | } 18 | 19 | size_t readBytes(char* buffer, size_t length) { 20 | _stream.read(buffer, static_cast(length)); 21 | return static_cast(_stream.gcount()); 22 | } 23 | 24 | private: 25 | CustomReader(const CustomReader&); 26 | }; 27 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Helpers/Stream.h: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | // Reproduces Arduino's Stream class 8 | class Stream // : public Print 9 | { 10 | public: 11 | virtual ~Stream() {} 12 | virtual int read() = 0; 13 | virtual size_t readBytes(char *buffer, size_t length) = 0; 14 | }; 15 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Helpers/WString.h: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | // Reproduces Arduino's String class 10 | class String { 11 | public: 12 | String& operator+=(const char* rhs) { 13 | _str += rhs; 14 | return *this; 15 | } 16 | 17 | size_t length() const { 18 | return _str.size(); 19 | } 20 | 21 | const char* c_str() const { 22 | return _str.c_str(); 23 | } 24 | 25 | bool operator==(const char* s) const { 26 | return _str == s; 27 | } 28 | 29 | friend std::ostream& operator<<(std::ostream& lhs, const ::String& rhs) { 30 | lhs << rhs._str; 31 | return lhs; 32 | } 33 | 34 | private: 35 | std::string _str; 36 | }; 37 | 38 | class StringSumHelper; 39 | 40 | inline bool operator==(const std::string& lhs, const ::String& rhs) { 41 | return lhs == rhs.c_str(); 42 | } 43 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Helpers/progmem_emulation.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include // uint8_t 6 | #include // strcmp, strlen... 7 | 8 | class __FlashStringHelper; 9 | 10 | inline const void* convertPtrToFlash(const void* s) { 11 | return reinterpret_cast(s) + 42; 12 | } 13 | 14 | inline const void* convertFlashToPtr(const void* s) { 15 | return reinterpret_cast(s) - 42; 16 | } 17 | 18 | #define F(X) reinterpret_cast(convertPtrToFlash(X)) 19 | #define FC(X) reinterpret_cast(convertPtrToFlash(X)) 20 | 21 | inline uint8_t pgm_read_byte(const void* p) { 22 | return *reinterpret_cast(convertFlashToPtr(p)); 23 | } 24 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/IntegrationTests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(IntegrationTests 6 | gbathree.cpp 7 | issue772.cpp 8 | round_trip.cpp 9 | openweathermap.cpp 10 | ) 11 | 12 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") 13 | target_compile_options(IntegrationTests 14 | PUBLIC 15 | -fsingle-precision-constant # issue 544 16 | ) 17 | endif() 18 | 19 | add_test(IntegrationTests IntegrationTests) 20 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(JsonArrayTests 6 | add.cpp 7 | copyArray.cpp 8 | createNested.cpp 9 | equals.cpp 10 | get.cpp 11 | isNull.cpp 12 | iterator.cpp 13 | memoryUsage.cpp 14 | nesting.cpp 15 | remove.cpp 16 | size.cpp 17 | std_string.cpp 18 | subscript.cpp 19 | undefined.cpp 20 | ) 21 | 22 | add_test(JsonArray JsonArrayTests) 23 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/createNested.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonArray basics") { 9 | DynamicJsonDocument doc(4096); 10 | JsonArray array = doc.to(); 11 | 12 | SECTION("CreateNestedArray") { 13 | JsonArray arr = array.createNestedArray(); 14 | REQUIRE(arr == array[0].as()); 15 | } 16 | 17 | SECTION("CreateNestedObject") { 18 | JsonObject obj = array.createNestedObject(); 19 | REQUIRE(obj == array[0].as()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/get.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonArray::get()") { 9 | DynamicJsonDocument doc(4096); 10 | deserializeJson(doc, "[1,2,3]"); 11 | JsonArray array = doc.as(); 12 | 13 | SECTION("Overflow") { 14 | REQUIRE(array.getElement(3).isNull()); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/nesting.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonArray::nesting()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonArray arr = doc.to(); 11 | 12 | SECTION("return 0 if uninitialized") { 13 | JsonArray unitialized; 14 | REQUIRE(unitialized.nesting() == 0); 15 | } 16 | 17 | SECTION("returns 1 for empty array") { 18 | REQUIRE(arr.nesting() == 1); 19 | } 20 | 21 | SECTION("returns 1 for flat array") { 22 | arr.add("hello"); 23 | REQUIRE(arr.nesting() == 1); 24 | } 25 | 26 | SECTION("returns 2 with nested array") { 27 | arr.createNestedArray(); 28 | REQUIRE(arr.nesting() == 2); 29 | } 30 | 31 | SECTION("returns 2 with nested object") { 32 | arr.createNestedObject(); 33 | REQUIRE(arr.nesting() == 2); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/size.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonArray::size()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonArray array = doc.to(); 11 | 12 | SECTION("returns 0 is empty") { 13 | REQUIRE(0U == array.size()); 14 | } 15 | 16 | SECTION("increases after add()") { 17 | array.add("hello"); 18 | REQUIRE(1U == array.size()); 19 | 20 | array.add("world"); 21 | REQUIRE(2U == array.size()); 22 | } 23 | 24 | SECTION("remains the same after replacing an element") { 25 | array.add("hello"); 26 | REQUIRE(1U == array.size()); 27 | 28 | array[0] = "hello"; 29 | REQUIRE(1U == array.size()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/std_string.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | static void eraseString(std::string &str) { 9 | char *p = const_cast(str.c_str()); 10 | while (*p) *p++ = '*'; 11 | } 12 | 13 | TEST_CASE("std::string") { 14 | DynamicJsonDocument doc(4096); 15 | JsonArray array = doc.to(); 16 | 17 | SECTION("add()") { 18 | std::string value("hello"); 19 | array.add(value); 20 | eraseString(value); 21 | REQUIRE(std::string("hello") == array[0]); 22 | } 23 | 24 | SECTION("operator[]") { 25 | std::string value("world"); 26 | array.add("hello"); 27 | array[0] = value; 28 | eraseString(value); 29 | REQUIRE(std::string("world") == array[0]); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonArray/undefined.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace Catch::Matchers; 9 | 10 | TEST_CASE("Undefined JsonArray") { 11 | JsonArray array; 12 | 13 | SECTION("SubscriptFails") { 14 | REQUIRE(array[0].isNull()); 15 | } 16 | 17 | SECTION("AddFails") { 18 | array.add(1); 19 | REQUIRE(0 == array.size()); 20 | } 21 | 22 | SECTION("CreateNestedArrayFails") { 23 | REQUIRE(array.createNestedArray().isNull()); 24 | } 25 | 26 | SECTION("CreateNestedObjectFails") { 27 | REQUIRE(array.createNestedObject().isNull()); 28 | } 29 | 30 | SECTION("PrintToWritesBrackets") { 31 | char buffer[32]; 32 | serializeJson(array, buffer, sizeof(buffer)); 33 | REQUIRE_THAT(buffer, Equals("null")); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonDeserializer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(JsonDeserializerTests 6 | array.cpp 7 | array_static.cpp 8 | DeserializationError.cpp 9 | filter.cpp 10 | incomplete_input.cpp 11 | input_types.cpp 12 | invalid_input.cpp 13 | misc.cpp 14 | nestingLimit.cpp 15 | number.cpp 16 | object.cpp 17 | object_static.cpp 18 | string.cpp 19 | ) 20 | 21 | set_target_properties(JsonDeserializerTests PROPERTIES UNITY_BUILD OFF) 22 | 23 | add_test(JsonDeserializer JsonDeserializerTests) 24 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonDocument/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(JsonDocumentTests 6 | add.cpp 7 | BasicJsonDocument.cpp 8 | compare.cpp 9 | containsKey.cpp 10 | createNested.cpp 11 | DynamicJsonDocument.cpp 12 | isNull.cpp 13 | nesting.cpp 14 | remove.cpp 15 | shrinkToFit.cpp 16 | size.cpp 17 | StaticJsonDocument.cpp 18 | subscript.cpp 19 | ) 20 | 21 | add_test(JsonDocument JsonDocumentTests) 22 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonDocument/add.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonDocument::add()") { 9 | DynamicJsonDocument doc(4096); 10 | 11 | SECTION("integer") { 12 | doc.add(42); 13 | 14 | REQUIRE(doc.as() == "[42]"); 15 | } 16 | 17 | SECTION("const char*") { 18 | doc.add("hello"); 19 | 20 | REQUIRE(doc.as() == "[\"hello\"]"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonDocument/nesting.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonDocument::nesting()") { 9 | DynamicJsonDocument doc(4096); 10 | 11 | SECTION("return 0 if uninitialized") { 12 | REQUIRE(doc.nesting() == 0); 13 | } 14 | 15 | SECTION("returns 0 for string") { 16 | JsonVariant var = doc.to(); 17 | var.set("hello"); 18 | REQUIRE(doc.nesting() == 0); 19 | } 20 | 21 | SECTION("returns 1 for empty object") { 22 | doc.to(); 23 | REQUIRE(doc.nesting() == 1); 24 | } 25 | 26 | SECTION("returns 1 for empty array") { 27 | doc.to(); 28 | REQUIRE(doc.nesting() == 1); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonDocument/size.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonDocument::size()") { 9 | DynamicJsonDocument doc(4096); 10 | 11 | SECTION("returns 0") { 12 | REQUIRE(doc.size() == 0); 13 | } 14 | 15 | SECTION("as an array, return 2") { 16 | doc.add(1); 17 | doc.add(2); 18 | 19 | REQUIRE(doc.size() == 2); 20 | } 21 | 22 | SECTION("as an object, return 2") { 23 | doc["a"] = 1; 24 | doc["b"] = 2; 25 | 26 | REQUIRE(doc.size() == 2); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonObject/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(JsonObjectTests 6 | containsKey.cpp 7 | copy.cpp 8 | createNestedArray.cpp 9 | createNestedObject.cpp 10 | equals.cpp 11 | invalid.cpp 12 | isNull.cpp 13 | iterator.cpp 14 | memoryUsage.cpp 15 | nesting.cpp 16 | remove.cpp 17 | size.cpp 18 | std_string.cpp 19 | subscript.cpp 20 | ) 21 | 22 | add_test(JsonObject JsonObjectTests) 23 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonObject/createNestedArray.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonObject::createNestedArray()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonObject obj = doc.to(); 11 | 12 | SECTION("key is a const char*") { 13 | JsonArray arr = obj.createNestedArray("hello"); 14 | REQUIRE(arr.isNull() == false); 15 | } 16 | 17 | #ifdef HAS_VARIABLE_LENGTH_ARRAY 18 | SECTION("key is a VLA") { 19 | int i = 16; 20 | char vla[i]; 21 | strcpy(vla, "hello"); 22 | 23 | JsonArray arr = obj.createNestedArray(vla); 24 | REQUIRE(arr.isNull() == false); 25 | } 26 | #endif 27 | } 28 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonObject/createNestedObject.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonObject::createNestedObject()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonObject obj = doc.to(); 11 | 12 | SECTION("key is a const char*") { 13 | obj.createNestedObject("hello"); 14 | } 15 | 16 | #ifdef HAS_VARIABLE_LENGTH_ARRAY 17 | SECTION("key is a VLA") { 18 | int i = 16; 19 | char vla[i]; 20 | strcpy(vla, "hello"); 21 | 22 | obj.createNestedObject(vla); 23 | } 24 | #endif 25 | } 26 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonObject/invalid.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace Catch::Matchers; 9 | 10 | TEST_CASE("JsonObject::invalid()") { 11 | JsonObject obj; 12 | 13 | SECTION("SubscriptFails") { 14 | REQUIRE(obj["key"].isNull()); 15 | } 16 | 17 | SECTION("AddFails") { 18 | obj["hello"] = "world"; 19 | REQUIRE(0 == obj.size()); 20 | } 21 | 22 | SECTION("CreateNestedArrayFails") { 23 | REQUIRE(obj.createNestedArray("hello").isNull()); 24 | } 25 | 26 | SECTION("CreateNestedObjectFails") { 27 | REQUIRE(obj.createNestedObject("world").isNull()); 28 | } 29 | 30 | SECTION("serialize to 'null'") { 31 | char buffer[32]; 32 | serializeJson(obj, buffer, sizeof(buffer)); 33 | REQUIRE_THAT(buffer, Equals("null")); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonObject/nesting.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonObject::nesting()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonObject obj = doc.to(); 11 | 12 | SECTION("return 0 if uninitialized") { 13 | JsonObject unitialized; 14 | REQUIRE(unitialized.nesting() == 0); 15 | } 16 | 17 | SECTION("returns 1 for empty object") { 18 | REQUIRE(obj.nesting() == 1); 19 | } 20 | 21 | SECTION("returns 1 for flat object") { 22 | obj["hello"] = "world"; 23 | REQUIRE(obj.nesting() == 1); 24 | } 25 | 26 | SECTION("returns 2 with nested array") { 27 | obj.createNestedArray("nested"); 28 | REQUIRE(obj.nesting() == 2); 29 | } 30 | 31 | SECTION("returns 2 with nested object") { 32 | obj.createNestedObject("nested"); 33 | REQUIRE(obj.nesting() == 2); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonSerializer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(JsonSerializerTests 6 | CustomWriter.cpp 7 | JsonArray.cpp 8 | JsonArrayPretty.cpp 9 | JsonObject.cpp 10 | JsonObjectPretty.cpp 11 | JsonVariant.cpp 12 | misc.cpp 13 | std_stream.cpp 14 | std_string.cpp 15 | ) 16 | 17 | add_test(JsonSerializer JsonSerializerTests) 18 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonSerializer/misc.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | TEST_CASE("serializeJson(MemberProxy)") { 6 | DynamicJsonDocument doc(4096); 7 | deserializeJson(doc, "{\"hello\":42}"); 8 | JsonObject obj = doc.as(); 9 | std::string result; 10 | 11 | serializeJson(obj["hello"], result); 12 | 13 | REQUIRE(result == "42"); 14 | } 15 | 16 | TEST_CASE("serializeJson(ElementProxy)") { 17 | DynamicJsonDocument doc(4096); 18 | deserializeJson(doc, "[42]"); 19 | JsonArray arr = doc.as(); 20 | std::string result; 21 | 22 | serializeJson(arr[0], result); 23 | 24 | REQUIRE(result == "42"); 25 | } 26 | 27 | TEST_CASE("serializeJson(JsonVariantSubscript)") { 28 | DynamicJsonDocument doc(4096); 29 | deserializeJson(doc, "[42]"); 30 | JsonVariant var = doc.as(); 31 | std::string result; 32 | 33 | serializeJson(var[0], result); 34 | 35 | REQUIRE(result == "42"); 36 | } 37 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonVariant/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(JsonVariantTests 6 | add.cpp 7 | as.cpp 8 | clear.cpp 9 | compare.cpp 10 | containsKey.cpp 11 | copy.cpp 12 | createNested.cpp 13 | is.cpp 14 | isnull.cpp 15 | memoryUsage.cpp 16 | misc.cpp 17 | nesting.cpp 18 | or.cpp 19 | overflow.cpp 20 | remove.cpp 21 | set.cpp 22 | subscript.cpp 23 | types.cpp 24 | undefined.cpp 25 | ) 26 | 27 | add_test(JsonVariant JsonVariantTests) 28 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonVariant/add.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | TEST_CASE("JsonVariant::add()") { 10 | DynamicJsonDocument doc(4096); 11 | JsonVariant var = doc.to(); 12 | 13 | SECTION("integer") { 14 | var.add(42); 15 | 16 | REQUIRE(var.as() == "[42]"); 17 | } 18 | 19 | SECTION("const char*") { 20 | var.add("hello"); 21 | 22 | REQUIRE(var.as() == "[\"hello\"]"); 23 | } 24 | 25 | SECTION("std::string") { 26 | var.add(std::string("hello")); 27 | 28 | REQUIRE(var.as() == "[\"hello\"]"); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonVariant/clear.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | TEST_CASE("JsonVariant::clear()") { 10 | DynamicJsonDocument doc(4096); 11 | JsonVariant var = doc.to(); 12 | 13 | SECTION("size goes back to zero") { 14 | var.add(42); 15 | var.clear(); 16 | 17 | REQUIRE(var.size() == 0); 18 | } 19 | 20 | SECTION("isNull() return true") { 21 | var.add("hello"); 22 | var.clear(); 23 | 24 | REQUIRE(var.isNull() == true); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonVariant/nesting.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("JsonVariant::nesting()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonVariant var = doc.to(); 11 | 12 | SECTION("return 0 if uninitialized") { 13 | JsonVariant unitialized; 14 | REQUIRE(unitialized.nesting() == 0); 15 | } 16 | 17 | SECTION("returns 0 for string") { 18 | var.set("hello"); 19 | REQUIRE(var.nesting() == 0); 20 | } 21 | 22 | SECTION("returns 1 for empty object") { 23 | var.to(); 24 | REQUIRE(var.nesting() == 1); 25 | } 26 | 27 | SECTION("returns 1 for empty array") { 28 | var.to(); 29 | REQUIRE(var.nesting() == 1); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/JsonVariant/remove.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | static const char* null = 0; 10 | 11 | TEST_CASE("JsonVariant::remove()") { 12 | DynamicJsonDocument doc(4096); 13 | JsonVariant var = doc.to(); 14 | 15 | SECTION("remove(int)") { 16 | var.add(1); 17 | var.add(2); 18 | var.add(3); 19 | 20 | var.remove(1); 21 | 22 | REQUIRE(var.as() == "[1,3]"); 23 | } 24 | 25 | SECTION("remove(const char *)") { 26 | var["a"] = 1; 27 | var["b"] = 2; 28 | 29 | var.remove("a"); 30 | 31 | REQUIRE(var.as() == "{\"b\":2}"); 32 | } 33 | 34 | SECTION("remove(std::string)") { 35 | var["a"] = 1; 36 | var["b"] = 2; 37 | 38 | var.remove(std::string("b")); 39 | 40 | REQUIRE(var.as() == "{\"a\":1}"); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(MemberProxyTests 6 | add.cpp 7 | clear.cpp 8 | compare.cpp 9 | containsKey.cpp 10 | remove.cpp 11 | set.cpp 12 | size.cpp 13 | subscript.cpp 14 | ) 15 | 16 | add_test(MemberProxy MemberProxyTests) 17 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/add.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::add()") { 11 | DynamicJsonDocument doc(4096); 12 | MemberProxy mp = doc["hello"]; 13 | 14 | SECTION("add(int)") { 15 | mp.add(42); 16 | 17 | REQUIRE(doc.as() == "{\"hello\":[42]}"); 18 | } 19 | 20 | SECTION("add(const char*)") { 21 | mp.add("world"); 22 | 23 | REQUIRE(doc.as() == "{\"hello\":[\"world\"]}"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/clear.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::clear()") { 11 | DynamicJsonDocument doc(4096); 12 | MemberProxy mp = doc["hello"]; 13 | 14 | SECTION("size goes back to zero") { 15 | mp.add(42); 16 | mp.clear(); 17 | 18 | REQUIRE(mp.size() == 0); 19 | } 20 | 21 | SECTION("isNull() return true") { 22 | mp.add("hello"); 23 | mp.clear(); 24 | 25 | REQUIRE(mp.isNull() == true); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/compare.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::operator==()") { 11 | DynamicJsonDocument doc(4096); 12 | 13 | SECTION("same values") { 14 | doc["key1"] = "value"; 15 | doc["key2"] = "value"; 16 | REQUIRE(doc["key1"] == doc["key2"]); 17 | REQUIRE_FALSE(doc["key1"] != doc["key2"]); 18 | } 19 | 20 | SECTION("different values") { 21 | doc["key1"] = "value1"; 22 | doc["key2"] = "value2"; 23 | REQUIRE_FALSE(doc["key1"] == doc["key2"]); 24 | REQUIRE(doc["key1"] != doc["key2"]); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/containsKey.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::containsKey()") { 11 | DynamicJsonDocument doc(4096); 12 | MemberProxy mp = doc["hello"]; 13 | 14 | SECTION("containsKey(const char*)") { 15 | mp["key"] = "value"; 16 | 17 | REQUIRE(mp.containsKey("key") == true); 18 | REQUIRE(mp.containsKey("key") == true); 19 | } 20 | 21 | SECTION("containsKey(std::string)") { 22 | mp["key"] = "value"; 23 | 24 | REQUIRE(mp.containsKey(std::string("key")) == true); 25 | REQUIRE(mp.containsKey(std::string("key")) == true); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/set.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::set()") { 11 | DynamicJsonDocument doc(4096); 12 | MemberProxy mp = doc["hello"]; 13 | 14 | SECTION("set(int)") { 15 | mp.set(42); 16 | 17 | REQUIRE(doc.as() == "{\"hello\":42}"); 18 | } 19 | 20 | SECTION("set(const char*)") { 21 | mp.set("world"); 22 | 23 | REQUIRE(doc.as() == "{\"hello\":\"world\"}"); 24 | } 25 | 26 | SECTION("set(char[])") { // issue #1191 27 | char s[] = "world"; 28 | mp.set(s); 29 | strcpy(s, "!!!!!"); 30 | 31 | REQUIRE(doc.as() == "{\"hello\":\"world\"}"); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/size.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::size()") { 11 | DynamicJsonDocument doc(4096); 12 | MemberProxy mp = doc["hello"]; 13 | 14 | SECTION("returns 0") { 15 | REQUIRE(mp.size() == 0); 16 | } 17 | 18 | SECTION("as an array, return 2") { 19 | mp.add(1); 20 | mp.add(2); 21 | 22 | REQUIRE(mp.size() == 2); 23 | } 24 | 25 | SECTION("as an object, return 2") { 26 | mp["a"] = 1; 27 | mp["b"] = 2; 28 | 29 | REQUIRE(mp.size() == 2); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemberProxy/subscript.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("MemberProxy::operator[]") { 11 | DynamicJsonDocument doc(4096); 12 | MemberProxy mp = doc["hello"]; 13 | 14 | SECTION("set member") { 15 | mp["world"] = 42; 16 | 17 | REQUIRE(doc.as() == "{\"hello\":{\"world\":42}}"); 18 | } 19 | 20 | SECTION("set element") { 21 | mp[2] = 42; 22 | 23 | REQUIRE(doc.as() == "{\"hello\":[null,null,42]}"); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemoryPool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(MemoryPoolTests 6 | allocVariant.cpp 7 | allocString.cpp 8 | clear.cpp 9 | size.cpp 10 | StringBuilder.cpp 11 | ) 12 | 13 | add_test(MemoryPool MemoryPoolTests) 14 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MemoryPool/clear.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | static const size_t poolCapacity = 512; 11 | 12 | TEST_CASE("MemoryPool::clear()") { 13 | char buffer[poolCapacity]; 14 | MemoryPool pool(buffer, sizeof(buffer)); 15 | 16 | SECTION("Discards allocated variants") { 17 | pool.allocVariant(); 18 | 19 | pool.clear(); 20 | REQUIRE(pool.size() == 0); 21 | } 22 | 23 | SECTION("Discards allocated strings") { 24 | pool.allocFrozenString(10); 25 | REQUIRE(pool.size() > 0); 26 | 27 | pool.clear(); 28 | 29 | REQUIRE(pool.size() == 0); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Misc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(MiscTests 6 | conflicts.cpp 7 | FloatParts.cpp 8 | Readers.cpp 9 | StringAdapters.cpp 10 | StringWriter.cpp 11 | TypeTraits.cpp 12 | unsigned_char.cpp 13 | Utf8.cpp 14 | Utf16.cpp 15 | version.cpp 16 | ) 17 | 18 | set_target_properties(MiscTests PROPERTIES UNITY_BUILD OFF) 19 | 20 | add_test(Misc MiscTests) 21 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Misc/custom_string.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | struct custom_char_traits : std::char_traits {}; 10 | struct custom_allocator : std::allocator {}; 11 | typedef std::basic_string 12 | custom_string; 13 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Misc/version.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | using Catch::Matchers::StartsWith; 10 | 11 | TEST_CASE("ARDUINOJSON_VERSION") { 12 | std::stringstream version; 13 | 14 | version << ARDUINOJSON_VERSION_MAJOR << "." << ARDUINOJSON_VERSION_MINOR 15 | << "." << ARDUINOJSON_VERSION_REVISION; 16 | 17 | REQUIRE_THAT(ARDUINOJSON_VERSION, StartsWith(version.str())); 18 | } 19 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Misc/weird_strcmp.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | // Issue #1198: strcmp() implementation that returns a value larger than 8-bit 4 | 5 | namespace ARDUINOJSON_NAMESPACE { 6 | int strcmp(const char* a, const char* b) { 7 | int result = ::strcmp(a, b); 8 | if (result > 0) 9 | return 2147483647; 10 | if (result < 0) 11 | return -214748364; 12 | return 0; 13 | } 14 | 15 | int strncmp(const char* a, const char* b, size_t n) { 16 | int result = ::strncmp(a, b, n); 17 | if (result > 0) 18 | return 2147483647; 19 | if (result < 0) 20 | return -214748364; 21 | return 0; 22 | } 23 | } // namespace ARDUINOJSON_NAMESPACE 24 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | # we need C++11 for 'long long' 6 | set(CMAKE_CXX_STANDARD 11) 7 | 8 | add_executable(MixedConfigurationTests 9 | cpp11.cpp 10 | decode_unicode_0.cpp 11 | decode_unicode_1.cpp 12 | enable_alignment_0.cpp 13 | enable_alignment_1.cpp 14 | enable_comments_0.cpp 15 | enable_comments_1.cpp 16 | enable_infinity_0.cpp 17 | enable_infinity_1.cpp 18 | enable_nan_0.cpp 19 | enable_nan_1.cpp 20 | enable_progmem_1.cpp 21 | use_double_0.cpp 22 | use_double_1.cpp 23 | use_long_long_0.cpp 24 | use_long_long_1.cpp 25 | ) 26 | 27 | set_target_properties(MixedConfigurationTests PROPERTIES UNITY_BUILD OFF) 28 | 29 | add_test(MixedConfiguration MixedConfigurationTests) 30 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/decode_unicode_0.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_DECODE_UNICODE 0 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("ARDUINOJSON_DECODE_UNICODE == 0") { 7 | DynamicJsonDocument doc(2048); 8 | DeserializationError err = deserializeJson(doc, "\"\\uD834\\uDD1E\""); 9 | 10 | REQUIRE(err == DeserializationError::NotSupported); 11 | } 12 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/decode_unicode_1.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_DECODE_UNICODE 1 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("ARDUINOJSON_DECODE_UNICODE == 1") { 7 | DynamicJsonDocument doc(2048); 8 | DeserializationError err = deserializeJson(doc, "\"\\uD834\\uDD1E\""); 9 | 10 | REQUIRE(err == DeserializationError::Ok); 11 | } 12 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/enable_nan_0.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_ENABLE_NAN 0 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | TEST_CASE("ARDUINOJSON_ENABLE_NAN == 0") { 8 | DynamicJsonDocument doc(4096); 9 | JsonObject root = doc.to(); 10 | 11 | SECTION("serializeJson()") { 12 | root["X"] = std::numeric_limits::signaling_NaN(); 13 | 14 | std::string json; 15 | serializeJson(doc, json); 16 | 17 | REQUIRE(json == "{\"X\":null}"); 18 | } 19 | 20 | SECTION("deserializeJson()") { 21 | auto err = deserializeJson(doc, "{\"X\":NaN}"); 22 | 23 | REQUIRE(err == DeserializationError::InvalidInput); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/enable_nan_1.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_ENABLE_NAN 1 2 | #include 3 | 4 | #include 5 | #include 6 | 7 | namespace my { 8 | using ARDUINOJSON_NAMESPACE::isnan; 9 | } // namespace my 10 | 11 | TEST_CASE("ARDUINOJSON_ENABLE_NAN == 1") { 12 | DynamicJsonDocument doc(4096); 13 | JsonObject root = doc.to(); 14 | 15 | SECTION("serializeJson()") { 16 | root["X"] = std::numeric_limits::signaling_NaN(); 17 | 18 | std::string json; 19 | serializeJson(doc, json); 20 | 21 | REQUIRE(json == "{\"X\":NaN}"); 22 | } 23 | 24 | SECTION("deserializeJson()") { 25 | auto err = deserializeJson(doc, "{\"X\":NaN}"); 26 | float x = doc["X"]; 27 | 28 | REQUIRE(err == DeserializationError::Ok); 29 | REQUIRE(my::isnan(x)); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/use_double_0.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_USE_DOUBLE 0 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("ARDUINOJSON_USE_DOUBLE == 0") { 7 | DynamicJsonDocument doc(4096); 8 | JsonObject root = doc.to(); 9 | 10 | root["pi"] = 3.14; 11 | root["e"] = 2.72; 12 | 13 | std::string json; 14 | serializeJson(doc, json); 15 | 16 | REQUIRE(json == "{\"pi\":3.14,\"e\":2.72}"); 17 | } 18 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/use_double_1.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_USE_DOUBLE 1 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("ARDUINOJSON_USE_DOUBLE == 1") { 7 | DynamicJsonDocument doc(4096); 8 | JsonObject root = doc.to(); 9 | 10 | root["pi"] = 3.14; 11 | root["e"] = 2.72; 12 | 13 | std::string json; 14 | serializeJson(doc, json); 15 | 16 | REQUIRE(json == "{\"pi\":3.14,\"e\":2.72}"); 17 | } 18 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/use_long_long_0.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_USE_LONG_LONG 0 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("ARDUINOJSON_USE_LONG_LONG == 0") { 7 | DynamicJsonDocument doc(4096); 8 | 9 | doc["A"] = 42; 10 | doc["B"] = 84; 11 | 12 | std::string json; 13 | serializeJson(doc, json); 14 | 15 | REQUIRE(json == "{\"A\":42,\"B\":84}"); 16 | } 17 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MixedConfiguration/use_long_long_1.cpp: -------------------------------------------------------------------------------- 1 | #define ARDUINOJSON_USE_LONG_LONG 1 2 | #include 3 | 4 | #include 5 | 6 | TEST_CASE("ARDUINOJSON_USE_LONG_LONG == 1") { 7 | DynamicJsonDocument doc(4096); 8 | JsonObject root = doc.to(); 9 | 10 | root["A"] = 123456789123456789; 11 | root["B"] = 987654321987654321; 12 | 13 | std::string json; 14 | serializeJson(doc, json); 15 | 16 | REQUIRE(json == "{\"A\":123456789123456789,\"B\":987654321987654321}"); 17 | } 18 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MsgPackDeserializer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(MsgPackDeserializerTests 6 | deserializeArray.cpp 7 | deserializeObject.cpp 8 | deserializeStaticVariant.cpp 9 | deserializeVariant.cpp 10 | doubleToFloat.cpp 11 | incompleteInput.cpp 12 | input_types.cpp 13 | nestingLimit.cpp 14 | notSupported.cpp 15 | ) 16 | 17 | add_test(MsgPackDeserializer MsgPackDeserializerTests) 18 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MsgPackDeserializer/doubleToFloat.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | template 11 | static void check(const char* input, T expected) { 12 | T actual; 13 | uint8_t* f = reinterpret_cast(&actual); 14 | const uint8_t* d = reinterpret_cast(input); 15 | doubleToFloat(d, f); 16 | fixEndianess(actual); 17 | CHECK(actual == expected); 18 | } 19 | 20 | TEST_CASE("doubleToFloat()") { 21 | check("\x40\x09\x21\xCA\xC0\x83\x12\x6F", 3.1415f); 22 | check("\x00\x00\x00\x00\x00\x00\x00\x00", 0.0f); 23 | check("\x80\x00\x00\x00\x00\x00\x00\x00", -0.0f); 24 | check("\xC0\x5E\xDC\xCC\xCC\xCC\xCC\xCD", -123.45f); 25 | } 26 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MsgPackSerializer/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(MsgPackSerializerTests 6 | destination_types.cpp 7 | measure.cpp 8 | misc.cpp 9 | serializeArray.cpp 10 | serializeObject.cpp 11 | serializeVariant.cpp 12 | ) 13 | 14 | add_test(MsgPackSerializer MsgPackSerializerTests) 15 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/MsgPackSerializer/measure.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | TEST_CASE("measureMsgPack()") { 9 | DynamicJsonDocument doc(4096); 10 | JsonObject object = doc.to(); 11 | object["hello"] = "world"; 12 | 13 | REQUIRE(measureMsgPack(doc) == 13); 14 | } 15 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Numbers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(NumbersTests 6 | parseFloat.cpp 7 | parseInteger.cpp 8 | parseNumber.cpp 9 | ) 10 | 11 | 12 | add_test(Numbers NumbersTests) 13 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/Numbers/parseNumber.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #include 6 | #include 7 | 8 | using namespace ARDUINOJSON_NAMESPACE; 9 | 10 | TEST_CASE("Test uint32_t overflow") { 11 | ParsedNumber first = 12 | parseNumber("4294967295"); 13 | ParsedNumber second = 14 | parseNumber("4294967296"); 15 | 16 | REQUIRE(first.type() == uint8_t(VALUE_IS_POSITIVE_INTEGER)); 17 | REQUIRE(second.type() == uint8_t(VALUE_IS_FLOAT)); 18 | } 19 | 20 | TEST_CASE("Invalid value") { 21 | ParsedNumber result = parseNumber("6a3"); 22 | 23 | REQUIRE(result.type() == uint8_t(VALUE_IS_NULL)); 24 | } 25 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/TextFormatter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_executable(TextFormatterTests 6 | writeFloat.cpp 7 | writeString.cpp 8 | ) 9 | 10 | set_target_properties(TextFormatterTests PROPERTIES UNITY_BUILD OFF) 11 | 12 | add_test(TextFormatter TextFormatterTests) 13 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/catch/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ArduinoJson - arduinojson.org 2 | # Copyright Benoit Blanchon 2014-2020 3 | # MIT License 4 | 5 | add_library(catch 6 | catch.hpp 7 | catch.cpp 8 | ) 9 | 10 | target_include_directories(catch 11 | PUBLIC 12 | ${CMAKE_CURRENT_SOURCE_DIR} 13 | ) 14 | 15 | if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") 16 | # prevent "xxx will change in GCC x.x" with arm-linux-gnueabihf-gcc 17 | target_compile_options(catch PRIVATE -Wno-psabi) 18 | endif() 19 | -------------------------------------------------------------------------------- /ArduinoJson/extras/tests/catch/catch.cpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #define CATCH_CONFIG_MAIN 6 | #include "catch.hpp" 7 | -------------------------------------------------------------------------------- /ArduinoJson/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ArduinoJson", 3 | "keywords": "json, rest, http, web", 4 | "description": "A simple and efficient JSON library for embedded C++. ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ fixed allocation, ✔ zero-copy, ✔ streams, ✔ filtering, and more. It is the most popular Arduino library on GitHub ❤❤❤❤❤. Check out arduinojson.org for a comprehensive documentation.", 5 | "homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/bblanchon/ArduinoJson.git" 9 | }, 10 | "version": "6.15.2", 11 | "authors": { 12 | "name": "Benoit Blanchon", 13 | "url": "https://blog.benoitblanchon.fr" 14 | }, 15 | "exclude": [ 16 | ".github", 17 | "extras" 18 | ], 19 | "frameworks": "arduino", 20 | "platforms": "*" 21 | } 22 | -------------------------------------------------------------------------------- /ArduinoJson/library.properties: -------------------------------------------------------------------------------- 1 | name=ArduinoJson 2 | version=6.15.2 3 | author=Benoit Blanchon 4 | maintainer=Benoit Blanchon 5 | sentence=A simple and efficient JSON library for embedded C++. 6 | paragraph=ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ fixed allocation, ✔ zero-copy, ✔ streams, ✔ filtering, and more. It is the most popular Arduino library on GitHub ❤❤❤❤❤. Check out arduinojson.org for a comprehensive documentation. 7 | category=Data Processing 8 | url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties 9 | architectures=* 10 | repository=https://github.com/bblanchon/ArduinoJson.git 11 | license=MIT 12 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson.h: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #ifdef __cplusplus 8 | 9 | #include "ArduinoJson.hpp" 10 | 11 | using namespace ArduinoJson; 12 | 13 | #else 14 | 15 | #error ArduinoJson requires a C++ compiler, please change file extension to .cc or .cpp 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Array/ArrayFunctions.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | inline VariantData *arrayAdd(CollectionData *arr, MemoryPool *pool) { 12 | return arr ? arr->addElement(pool) : 0; 13 | } 14 | 15 | template 16 | inline void arrayAccept(const CollectionData *arr, Visitor &visitor) { 17 | if (arr) 18 | visitor.visitArray(*arr); 19 | else 20 | visitor.visitNull(); 21 | } 22 | 23 | inline bool arrayEquals(const CollectionData *lhs, const CollectionData *rhs) { 24 | if (lhs == rhs) 25 | return true; 26 | if (!lhs || !rhs) 27 | return false; 28 | return lhs->equalsArray(*rhs); 29 | } 30 | } // namespace ARDUINOJSON_NAMESPACE 31 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Array/ArrayImpl.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ARDUINOJSON_NAMESPACE { 11 | 12 | template 13 | inline ArrayRef ArrayShortcuts::createNestedArray() const { 14 | return impl()->addElement().template to(); 15 | } 16 | 17 | template 18 | inline ObjectRef ArrayShortcuts::createNestedObject() const { 19 | return impl()->addElement().template to(); 20 | } 21 | 22 | template 23 | inline ElementProxy ArrayShortcuts::operator[]( 24 | size_t index) const { 25 | return ElementProxy(*impl(), index); 26 | } 27 | 28 | } // namespace ARDUINOJSON_NAMESPACE 29 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Deserialization/NestingLimit.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ARDUINOJSON_NAMESPACE { 11 | 12 | class NestingLimit { 13 | public: 14 | NestingLimit() : _value(ARDUINOJSON_DEFAULT_NESTING_LIMIT) {} 15 | explicit NestingLimit(uint8_t n) : _value(n) {} 16 | 17 | NestingLimit decrement() const { 18 | ARDUINOJSON_ASSERT(_value > 0); 19 | return NestingLimit(static_cast(_value - 1)); 20 | } 21 | 22 | bool reached() const { 23 | return _value == 0; 24 | } 25 | 26 | private: 27 | uint8_t _value; 28 | }; 29 | } // namespace ARDUINOJSON_NAMESPACE 30 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Deserialization/Readers/ArduinoStreamReader.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct Reader::value>::type> { 14 | public: 15 | explicit Reader(Stream& stream) : _stream(&stream) {} 16 | 17 | int read() { 18 | // don't use _stream.read() as it ignores the timeout 19 | char c; 20 | return _stream->readBytes(&c, 1) ? static_cast(c) : -1; 21 | } 22 | 23 | size_t readBytes(char* buffer, size_t length) { 24 | return _stream->readBytes(buffer, length); 25 | } 26 | 27 | private: 28 | Stream* _stream; 29 | }; 30 | 31 | } // namespace ARDUINOJSON_NAMESPACE 32 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Deserialization/Readers/ArduinoStringReader.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ARDUINOJSON_NAMESPACE { 8 | 9 | template 10 | struct Reader::value>::type> 12 | : BoundedReader { 13 | explicit Reader(const ::String& s) 14 | : BoundedReader(s.c_str(), s.length()) {} 15 | }; 16 | 17 | } // namespace ARDUINOJSON_NAMESPACE 18 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Deserialization/Readers/StdStreamReader.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct Reader::value>::type> { 14 | public: 15 | explicit Reader(std::istream& stream) : _stream(&stream) {} 16 | 17 | int read() { 18 | return _stream->get(); 19 | } 20 | 21 | size_t readBytes(char* buffer, size_t length) { 22 | _stream->read(buffer, static_cast(length)); 23 | return static_cast(_stream->gcount()); 24 | } 25 | 26 | private: 27 | std::istream* _stream; 28 | }; 29 | } // namespace ARDUINOJSON_NAMESPACE 30 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Document/DynamicJsonDocument.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include // malloc, free 10 | 11 | namespace ARDUINOJSON_NAMESPACE { 12 | 13 | struct DefaultAllocator { 14 | void* allocate(size_t size) { 15 | return malloc(size); 16 | } 17 | 18 | void deallocate(void* ptr) { 19 | free(ptr); 20 | } 21 | 22 | void* reallocate(void* ptr, size_t new_size) { 23 | return realloc(ptr, new_size); 24 | } 25 | }; 26 | 27 | typedef BasicJsonDocument DynamicJsonDocument; 28 | 29 | } // namespace ARDUINOJSON_NAMESPACE 30 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Memory/StringSlot.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include // for size_t 8 | 9 | #include 10 | 11 | #define JSON_STRING_SIZE(SIZE) (SIZE) 12 | 13 | namespace ARDUINOJSON_NAMESPACE { 14 | 15 | struct StringSlot { 16 | char *value; 17 | size_t size; 18 | }; 19 | } // namespace ARDUINOJSON_NAMESPACE 20 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Misc/Visitable.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | struct Visitable { 12 | // template 13 | // void accept(Visitor&) const; 14 | }; 15 | 16 | template 17 | struct IsVisitable : is_base_of {}; 18 | 19 | template 20 | struct IsVisitable : IsVisitable {}; 21 | } // namespace ARDUINOJSON_NAMESPACE 22 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/MsgPack/ieee754.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | inline void doubleToFloat(const uint8_t d[8], uint8_t f[4]) { 12 | f[0] = uint8_t((d[0] & 0xC0) | (d[0] << 3 & 0x3f) | (d[1] >> 5)); 13 | f[1] = uint8_t((d[1] << 3) | (d[2] >> 5)); 14 | f[2] = uint8_t((d[2] << 3) | (d[3] >> 5)); 15 | f[3] = uint8_t((d[3] << 3) | (d[4] >> 5)); 16 | } 17 | 18 | } // namespace ARDUINOJSON_NAMESPACE 19 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Numbers/Float.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ARDUINOJSON_NAMESPACE { 11 | 12 | #if ARDUINOJSON_USE_DOUBLE 13 | typedef double Float; 14 | #else 15 | typedef float Float; 16 | #endif 17 | } // namespace ARDUINOJSON_NAMESPACE 18 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Numbers/parseFloat.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ARDUINOJSON_NAMESPACE { 11 | 12 | template 13 | inline T parseFloat(const char* s) { 14 | // try to reuse the same parameters as JsonDeserializer 15 | typedef typename choose_largest::type TFloat; 16 | return parseNumber(s).template as(); 17 | } 18 | } // namespace ARDUINOJSON_NAMESPACE 19 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Numbers/parseInteger.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ARDUINOJSON_NAMESPACE { 12 | template 13 | T parseInteger(const char *s) { 14 | // try to reuse the same parameters as JsonDeserializer 15 | typedef typename choose_largest::type>::type 16 | TUInt; 17 | return parseNumber(s).template as(); 18 | } 19 | } // namespace ARDUINOJSON_NAMESPACE 20 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Operators/VariantOperators.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | namespace ARDUINOJSON_NAMESPACE { 12 | 13 | template 14 | class VariantOperators : public VariantComparisons, 15 | public VariantOr, 16 | public VariantShortcuts {}; 17 | } // namespace ARDUINOJSON_NAMESPACE 18 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Operators/VariantShortcuts.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ARDUINOJSON_NAMESPACE { 11 | 12 | template 13 | class VariantShortcuts : public ObjectShortcuts, 14 | public ArrayShortcuts { 15 | public: 16 | using ArrayShortcuts::createNestedArray; 17 | using ArrayShortcuts::createNestedObject; 18 | using ArrayShortcuts::operator[]; 19 | using ObjectShortcuts::createNestedArray; 20 | using ObjectShortcuts::createNestedObject; 21 | using ObjectShortcuts::operator[]; 22 | }; 23 | } // namespace ARDUINOJSON_NAMESPACE 24 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/alias_cast.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include // for size_t 9 | 10 | #include 11 | #include "math.hpp" 12 | 13 | namespace ARDUINOJSON_NAMESPACE { 14 | 15 | template 16 | struct alias_cast_t { 17 | union { 18 | F raw; 19 | T data; 20 | }; 21 | }; 22 | 23 | template 24 | T alias_cast(F raw_data) { 25 | alias_cast_t ac; 26 | ac.raw = raw_data; 27 | return ac.data; 28 | } 29 | } // namespace ARDUINOJSON_NAMESPACE 30 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/assert.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #if ARDUINOJSON_DEBUG 10 | #include 11 | #define ARDUINOJSON_ASSERT(X) assert(X) 12 | #else 13 | #define ARDUINOJSON_ASSERT(X) ((void)0) 14 | #endif 15 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/ctype.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | inline bool isdigit(char c) { 12 | return '0' <= c && c <= '9'; 13 | } 14 | 15 | inline bool issign(char c) { 16 | return '-' == c || c == '+'; 17 | } 18 | } // namespace ARDUINOJSON_NAMESPACE 19 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/gsl/not_null.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | #include 9 | 10 | namespace ARDUINOJSON_NAMESPACE { 11 | 12 | template 13 | class not_null { 14 | public: 15 | explicit not_null(T ptr) : _ptr(ptr) { 16 | ARDUINOJSON_ASSERT(ptr != NULL); 17 | } 18 | 19 | T get() const { 20 | ARDUINOJSON_ASSERT(_ptr != NULL); 21 | return _ptr; 22 | } 23 | 24 | private: 25 | T _ptr; 26 | }; 27 | 28 | template 29 | not_null make_not_null(T ptr) { 30 | ARDUINOJSON_ASSERT(ptr != NULL); 31 | return not_null(ptr); 32 | } 33 | 34 | } // namespace ARDUINOJSON_NAMESPACE 35 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/math.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // Some libraries #define isnan() and isinf() so we need to check before 12 | // using this name 13 | 14 | #ifndef isnan 15 | template 16 | bool isnan(T x) { 17 | return x != x; 18 | } 19 | #endif 20 | 21 | #ifndef isinf 22 | template 23 | bool isinf(T x) { 24 | return x != 0.0 && x * 2 == x; 25 | } 26 | #endif 27 | } // namespace ARDUINOJSON_NAMESPACE 28 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/mpl/max.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include // for size_t 10 | 11 | namespace ARDUINOJSON_NAMESPACE { 12 | 13 | // A meta-function that returns the highest value 14 | template Y)> 15 | struct Max {}; 16 | 17 | template 18 | struct Max { 19 | static const size_t value = X; 20 | }; 21 | 22 | template 23 | struct Max { 24 | static const size_t value = Y; 25 | }; 26 | } // namespace ARDUINOJSON_NAMESPACE 27 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/safe_strcmp.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include // int8_t 10 | 11 | namespace ARDUINOJSON_NAMESPACE { 12 | 13 | inline int safe_strcmp(const char* a, const char* b) { 14 | if (a == b) 15 | return 0; 16 | if (!a) 17 | return -1; 18 | if (!b) 19 | return 1; 20 | return strcmp(a, b); 21 | } 22 | 23 | inline int safe_strncmp(const char* a, const char* b, size_t n) { 24 | if (a == b) 25 | return 0; 26 | if (!a) 27 | return -1; 28 | if (!b) 29 | return 1; 30 | return strncmp(a, b, n); 31 | } 32 | } // namespace ARDUINOJSON_NAMESPACE 33 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "type_traits/conditional.hpp" 8 | #include "type_traits/enable_if.hpp" 9 | #include "type_traits/integral_constant.hpp" 10 | #include "type_traits/is_array.hpp" 11 | #include "type_traits/is_base_of.hpp" 12 | #include "type_traits/is_class.hpp" 13 | #include "type_traits/is_const.hpp" 14 | #include "type_traits/is_convertible.hpp" 15 | #include "type_traits/is_enum.hpp" 16 | #include "type_traits/is_floating_point.hpp" 17 | #include "type_traits/is_integral.hpp" 18 | #include "type_traits/is_same.hpp" 19 | #include "type_traits/is_signed.hpp" 20 | #include "type_traits/is_unsigned.hpp" 21 | #include "type_traits/make_unsigned.hpp" 22 | #include "type_traits/remove_const.hpp" 23 | #include "type_traits/remove_reference.hpp" 24 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/conditional.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct conditional { 13 | typedef TrueType type; 14 | }; 15 | 16 | template 17 | struct conditional { 18 | typedef FalseType type; 19 | }; 20 | } // namespace ARDUINOJSON_NAMESPACE 21 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/declval.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | T declval(); 13 | 14 | } // namespace ARDUINOJSON_NAMESPACE 15 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/enable_if.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // A meta-function that return the type T if Condition is true. 12 | template 13 | struct enable_if {}; 14 | 15 | template 16 | struct enable_if { 17 | typedef T type; 18 | }; 19 | } // namespace ARDUINOJSON_NAMESPACE 20 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/integral_constant.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct integral_constant { 13 | static const T value = v; 14 | }; 15 | 16 | typedef integral_constant true_type; 17 | typedef integral_constant false_type; 18 | 19 | } // namespace ARDUINOJSON_NAMESPACE 20 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_array.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | #include // size_t 10 | 11 | namespace ARDUINOJSON_NAMESPACE { 12 | 13 | template 14 | struct is_array : false_type {}; 15 | 16 | template 17 | struct is_array : true_type {}; 18 | 19 | template 20 | struct is_array : true_type {}; 21 | } // namespace ARDUINOJSON_NAMESPACE 22 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_base_of.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // A meta-function that returns true if Derived inherits from TBase is an 12 | // integral type. 13 | template 14 | class is_base_of { 15 | protected: // <- to avoid GCC's "all member functions in class are private" 16 | typedef char Yes[1]; 17 | typedef char No[2]; 18 | 19 | static Yes &probe(const TBase *); 20 | static No &probe(...); 21 | 22 | public: 23 | static const bool value = 24 | sizeof(probe(reinterpret_cast(0))) == sizeof(Yes); 25 | }; 26 | } // namespace ARDUINOJSON_NAMESPACE 27 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_class.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "declval.hpp" 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct is_class { 13 | protected: // <- to avoid GCC's "all member functions in class are private" 14 | typedef char Yes[1]; 15 | typedef char No[2]; 16 | 17 | template 18 | static Yes &probe(void (U::*)(void)); 19 | template 20 | static No &probe(...); 21 | 22 | public: 23 | static const bool value = sizeof(probe(0)) == sizeof(Yes); 24 | }; 25 | 26 | } // namespace ARDUINOJSON_NAMESPACE 27 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_const.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "integral_constant.hpp" 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // A meta-function that return the type T without the const modifier 12 | template 13 | struct is_const : false_type {}; 14 | 15 | template 16 | struct is_const : true_type {}; 17 | } // namespace ARDUINOJSON_NAMESPACE 18 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_convertible.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "declval.hpp" 8 | 9 | #ifdef _MSC_VER 10 | #pragma warning(push) 11 | // conversion from 'T' to 'To', possible loss of data 12 | #pragma warning(disable : 4244) 13 | #endif 14 | 15 | namespace ARDUINOJSON_NAMESPACE { 16 | 17 | template 18 | struct is_convertible { 19 | protected: // <- to avoid GCC's "all member functions in class are private" 20 | typedef char Yes[1]; 21 | typedef char No[2]; 22 | 23 | static Yes &probe(To); 24 | static No &probe(...); 25 | 26 | public: 27 | static const bool value = sizeof(probe(declval())) == sizeof(Yes); 28 | }; 29 | 30 | } // namespace ARDUINOJSON_NAMESPACE 31 | 32 | #ifdef _MSC_VER 33 | #pragma warning(pop) 34 | #endif 35 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_enum.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "is_class.hpp" 8 | #include "is_convertible.hpp" 9 | #include "is_floating_point.hpp" 10 | #include "is_integral.hpp" 11 | #include "is_same.hpp" 12 | 13 | namespace ARDUINOJSON_NAMESPACE { 14 | 15 | template 16 | struct is_enum { 17 | static const bool value = is_convertible::value && 18 | !is_class::value && !is_integral::value && 19 | !is_floating_point::value && 20 | !is_same::value; 21 | }; 22 | 23 | } // namespace ARDUINOJSON_NAMESPACE 24 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_floating_point.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "integral_constant.hpp" 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct is_floating_point : false_type {}; 13 | 14 | template <> 15 | struct is_floating_point : true_type {}; 16 | 17 | template <> 18 | struct is_floating_point : true_type {}; 19 | } // namespace ARDUINOJSON_NAMESPACE 20 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_same.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "integral_constant.hpp" 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // A meta-function that returns true if types T and U are the same. 12 | template 13 | struct is_same : false_type {}; 14 | 15 | template 16 | struct is_same : true_type {}; 17 | } // namespace ARDUINOJSON_NAMESPACE 18 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/is_unsigned.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "integral_constant.hpp" 8 | namespace ARDUINOJSON_NAMESPACE { 9 | 10 | template 11 | struct is_unsigned : false_type {}; 12 | 13 | template <> 14 | struct is_unsigned : true_type {}; 15 | 16 | template <> 17 | struct is_unsigned : true_type {}; 18 | 19 | template <> 20 | struct is_unsigned : true_type {}; 21 | 22 | template <> 23 | struct is_unsigned : true_type {}; 24 | 25 | template <> 26 | struct is_unsigned : true_type {}; 27 | 28 | #if ARDUINOJSON_HAS_INT64 29 | template <> 30 | struct is_unsigned : true_type {}; 31 | #endif 32 | 33 | #if ARDUINOJSON_HAS_LONG_LONG 34 | template <> 35 | struct is_unsigned : true_type {}; 36 | #endif 37 | } // namespace ARDUINOJSON_NAMESPACE 38 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/remove_const.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // A meta-function that return the type T without the const modifier 12 | template 13 | struct remove_const { 14 | typedef T type; 15 | }; 16 | template 17 | struct remove_const { 18 | typedef T type; 19 | }; 20 | } // namespace ARDUINOJSON_NAMESPACE 21 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/remove_reference.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | // A meta-function that return the type T without the reference modifier. 12 | template 13 | struct remove_reference { 14 | typedef T type; 15 | }; 16 | template 17 | struct remove_reference { 18 | typedef T type; 19 | }; 20 | } // namespace ARDUINOJSON_NAMESPACE 21 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/type_traits/type_identity.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "integral_constant.hpp" 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | struct type_identity { 13 | typedef T type; 14 | }; 15 | } // namespace ARDUINOJSON_NAMESPACE 16 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Polyfills/utility.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include "type_traits.hpp" 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | template 11 | inline void swap(T& a, T& b) { 12 | T t(a); 13 | a = b; 14 | b = t; 15 | } 16 | 17 | #if ARDUINOJSON_HAS_RVALUE_REFERENCES 18 | template 19 | typename remove_reference::type&& move(T&& t) { 20 | return static_cast::type&&>(t); 21 | } 22 | #else 23 | template 24 | T& move(T& t) { 25 | return t; 26 | } 27 | #endif 28 | } // namespace ARDUINOJSON_NAMESPACE 29 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Serialization/Writers/DummyWriter.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | class DummyWriter { 12 | public: 13 | size_t write(uint8_t) { 14 | return 1; 15 | } 16 | 17 | size_t write(const uint8_t*, size_t n) { 18 | return n; 19 | } 20 | }; 21 | } // namespace ARDUINOJSON_NAMESPACE 22 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Serialization/Writers/PrintWriter.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | namespace ARDUINOJSON_NAMESPACE { 8 | 9 | template 10 | class Writer< 11 | TDestination, 12 | typename enable_if::value>::type> { 13 | public: 14 | explicit Writer(::Print& print) : _print(&print) {} 15 | 16 | size_t write(uint8_t c) { 17 | return _print->write(c); 18 | } 19 | 20 | size_t write(const uint8_t* s, size_t n) { 21 | return _print->write(s, n); 22 | } 23 | 24 | private: 25 | ::Print* _print; 26 | }; 27 | 28 | } // namespace ARDUINOJSON_NAMESPACE 29 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Serialization/Writers/StdStreamWriter.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template 12 | class Writer< 13 | TDestination, 14 | typename enable_if::value>::type> { 15 | public: 16 | explicit Writer(std::ostream& os) : _os(&os) {} 17 | 18 | size_t write(uint8_t c) { 19 | _os->put(static_cast(c)); 20 | return 1; 21 | } 22 | 23 | size_t write(const uint8_t* s, size_t n) { 24 | _os->write(reinterpret_cast(s), 25 | static_cast(n)); 26 | return n; 27 | } 28 | 29 | private: 30 | std::ostream* _os; 31 | }; 32 | } // namespace ARDUINOJSON_NAMESPACE 33 | -------------------------------------------------------------------------------- /ArduinoJson/src/ArduinoJson/Serialization/measure.hpp: -------------------------------------------------------------------------------- 1 | // ArduinoJson - arduinojson.org 2 | // Copyright Benoit Blanchon 2014-2020 3 | // MIT License 4 | 5 | #pragma once 6 | 7 | #include 8 | 9 | namespace ARDUINOJSON_NAMESPACE { 10 | 11 | template