├── .gitignore
├── .travis.yml
├── LICENSE.txt
├── MakeFile
├── README.md
├── bin
├── firmware_1.0.16.bin
└── spiffs_1.0.16.bin
├── data
├── config
│ ├── activeStatus.json
│ ├── apSettings.json
│ ├── boilSettings.json
│ ├── brewSettings.json
│ ├── mashSettings.json
│ ├── ntpSettings.json
│ ├── otaSettings.json
│ └── wifiSettings.json
└── www
│ ├── app
│ ├── icon.png
│ ├── logo.png
│ └── manifest.json
│ ├── css
│ ├── 2.0af1.c.css
│ └── roboto.css
│ ├── favicon.ico
│ ├── fonts
│ ├── ro-li.w2
│ ├── ro-me.w2
│ └── ro-re.w2
│ ├── index.html
│ └── js
│ ├── 0.20a3.js.gz
│ ├── 1.b351.js.gz
│ └── 2.60b4.js.gz
├── interface
├── .env.development
├── .env.production
├── build
│ ├── app
│ │ ├── icon.png
│ │ └── manifest.json
│ ├── css
│ │ └── roboto.css
│ ├── favicon.ico
│ ├── fonts
│ │ ├── ro-li.w2
│ │ ├── ro-me.w2
│ │ └── ro-re.w2
│ └── index.html
├── config-overrides.js
├── package-lock.json
├── package.json
├── public
│ ├── app
│ │ ├── icon.png
│ │ ├── logo.png
│ │ └── manifest.json
│ ├── css
│ │ └── roboto.css
│ ├── favicon.ico
│ ├── fonts
│ │ ├── ro-li.w2
│ │ ├── ro-me.w2
│ │ └── ro-re.w2
│ └── index.html
└── src
│ ├── App.js
│ ├── AppRouting.js
│ ├── components
│ ├── BrewStatusGadget.js
│ ├── Chronometer.js
│ ├── ConfirmDialog.js
│ ├── IntText.js
│ ├── MenuAppBar.js
│ ├── PasswordValidator.js
│ ├── RestComponent.js
│ ├── SectionContent.js
│ ├── SnackbarNotification.js
│ ├── SortableList.js
│ ├── Tracking.js
│ └── Utils.js
│ ├── constants
│ ├── Endpoints.js
│ ├── Highlight.js
│ ├── NTPStatus.js
│ ├── TimeFormat.js
│ ├── WiFiAPModes.js
│ ├── WiFiConnectionStatus.js
│ └── WiFiSecurityModes.js
│ ├── containers
│ ├── APConfiguration.js
│ ├── APSettings.js
│ ├── APStatus.js
│ ├── About.js
│ ├── AboutContainer.js
│ ├── BoilSettings.js
│ ├── Brew.js
│ ├── BrewConfiguration.js
│ ├── BrewDayConfiguration.js
│ ├── BrewSettings.js
│ ├── MashSettings.js
│ ├── NTPConfiguration.js
│ ├── NTPSettings.js
│ ├── NTPStatus.js
│ ├── OTAConfiguration.js
│ ├── OTASettings.js
│ ├── WiFiConfiguration.js
│ ├── WiFiNetworkScanner.js
│ ├── WiFiSettings.js
│ └── WiFiStatus.js
│ ├── forms
│ ├── APSettingsForm.js
│ ├── BrewSettingsForm.js
│ ├── MashBoilSettingsForm.js
│ ├── NTPSettingsForm.js
│ ├── OTASettingsForm.js
│ ├── WiFiNetworkSelector.js
│ └── WiFiSettingsForm.js
│ ├── history.js
│ ├── index.js
│ ├── language
│ ├── de-DE.json
│ ├── en.json
│ ├── es-ES.json
│ ├── he-IL.json
│ ├── pt-BR.json
│ └── ru-RU.json
│ ├── style
│ └── BrewStyle.js
│ └── validators
│ ├── isHostname.js
│ ├── isIP.js
│ ├── optional.js
│ └── or.js
├── lib
├── ArduinoJson_ID64
│ ├── .clang-format
│ ├── .gitattributes
│ ├── .github
│ │ └── ISSUE_TEMPLATE.md
│ ├── .gitignore
│ ├── .library.json
│ ├── .mbedignore
│ ├── .travis.yml
│ ├── ArduinoJson.h
│ ├── CHANGELOG.md
│ ├── CMakeLists.txt
│ ├── CONTRIBUTING.md
│ ├── LICENSE.md
│ ├── README.md
│ ├── SUPPORT.md
│ ├── appveyor.yml
│ ├── banner.svg
│ ├── examples
│ │ ├── JsonConfigFile
│ │ │ └── JsonConfigFile.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
│ ├── 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
│ │ ├── ArduinoStreamReader.hpp
│ │ ├── CharPointerReader.hpp
│ │ ├── DeserializationError.hpp
│ │ ├── FlashStringReader.hpp
│ │ ├── IteratorReader.hpp
│ │ ├── NestingLimit.hpp
│ │ ├── StdStreamReader.hpp
│ │ └── deserialize.hpp
│ │ ├── Document
│ │ ├── BasicJsonDocument.hpp
│ │ ├── DynamicJsonDocument.hpp
│ │ ├── JsonDocument.hpp
│ │ └── StaticJsonDocument.hpp
│ │ ├── Json
│ │ ├── EscapeSequence.hpp
│ │ ├── JsonDeserializer.hpp
│ │ ├── JsonSerializer.hpp
│ │ ├── PrettyJsonSerializer.hpp
│ │ ├── TextFormatter.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
│ │ ├── VariantCasts.hpp
│ │ ├── 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
│ │ ├── safe_strcmp.hpp
│ │ ├── type_traits.hpp
│ │ ├── type_traits
│ │ │ ├── conditional.hpp
│ │ │ ├── enable_if.hpp
│ │ │ ├── integral_constant.hpp
│ │ │ ├── is_array.hpp
│ │ │ ├── is_base_of.hpp
│ │ │ ├── is_const.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
│ │ ├── DummyWriter.hpp
│ │ ├── DynamicStringWriter.hpp
│ │ ├── StaticStringWriter.hpp
│ │ ├── StreamWriter.hpp
│ │ ├── measure.hpp
│ │ └── serialize.hpp
│ │ ├── StringStorage
│ │ ├── StringCopier.hpp
│ │ ├── StringMover.hpp
│ │ └── StringStorage.hpp
│ │ ├── Strings
│ │ ├── ArduinoStringAdapter.hpp
│ │ ├── ConstRamStringAdapter.hpp
│ │ ├── FlashStringAdapter.hpp
│ │ ├── RamStringAdapter.hpp
│ │ ├── SizedFlashStringAdapter.hpp
│ │ ├── SizedRamStringAdapter.hpp
│ │ ├── StlStringAdapter.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
├── AsyncTCP_ID1826
│ ├── .library.json
│ ├── .travis.yml
│ ├── LICENSE
│ ├── README.md
│ ├── component.mk
│ ├── library.json
│ ├── library.properties
│ ├── src
│ │ ├── AsyncTCP.cpp
│ │ └── AsyncTCP.h
│ └── travis
│ │ └── common.sh
├── DallasTemp
│ ├── .gitignore
│ ├── DallasTemperature.cpp
│ ├── DallasTemperature.h
│ ├── README.md
│ ├── examples
│ │ ├── Alarm
│ │ │ └── Alarm.pde
│ │ ├── AlarmHandler
│ │ │ └── AlarmHandler.pde
│ │ ├── Multibus_simple
│ │ │ └── Multibus_simple.ino
│ │ ├── Multiple
│ │ │ └── Multiple.pde
│ │ ├── SetUserData
│ │ │ └── SetUserData.ino
│ │ ├── 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
│ ├── keywords.txt
│ ├── library.json
│ └── library.properties
├── ESP Async WebServer_ID306
│ ├── .library.json
│ ├── .travis.yml
│ ├── README.md
│ ├── component.mk
│ ├── examples
│ │ ├── ESP_AsyncFSBrowser
│ │ │ ├── .esp31b.skip
│ │ │ ├── ESP_AsyncFSBrowser.ino
│ │ │ └── data
│ │ │ │ ├── .exclude.files
│ │ │ │ ├── ace.js.gz
│ │ │ │ ├── ext-searchbox.js.gz
│ │ │ │ ├── favicon.ico
│ │ │ │ ├── index.htm
│ │ │ │ ├── mode-css.js.gz
│ │ │ │ ├── mode-html.js.gz
│ │ │ │ ├── mode-javascript.js.gz
│ │ │ │ └── worker-html.js.gz
│ │ └── simple_server
│ │ │ └── simple_server.ino
│ ├── keywords.txt
│ ├── library.json
│ ├── library.properties
│ ├── src
│ │ ├── AsyncEventSource.cpp
│ │ ├── AsyncEventSource.h
│ │ ├── AsyncJson.h
│ │ ├── AsyncWebSocket.cpp
│ │ ├── AsyncWebSocket.h
│ │ ├── ESPAsyncWebServer.h
│ │ ├── SPIFFSEditor.cpp
│ │ ├── SPIFFSEditor.h
│ │ ├── StringArray.h
│ │ ├── WebAuthentication.cpp
│ │ ├── WebAuthentication.h
│ │ ├── WebHandlerImpl.h
│ │ ├── WebHandlers.cpp
│ │ ├── WebRequest.cpp
│ │ ├── WebResponseImpl.h
│ │ ├── WebResponses.cpp
│ │ ├── WebServer.cpp
│ │ └── edit.htm
│ └── travis
│ │ └── common.sh
├── ESPAsyncTCP_ID305
│ ├── .gitignore
│ ├── .library.json
│ ├── .travis.yml
│ ├── LICENSE.txt
│ ├── README.md
│ ├── examples
│ │ ├── ClientServer
│ │ │ ├── Client
│ │ │ │ ├── Client.ino
│ │ │ │ └── config.h
│ │ │ └── Server
│ │ │ │ ├── Server.ino
│ │ │ │ └── config.h
│ │ └── SyncClient
│ │ │ ├── .esp31b.skip
│ │ │ └── SyncClient.ino
│ ├── library.json
│ ├── library.properties
│ ├── src
│ │ ├── AsyncPrinter.cpp
│ │ ├── AsyncPrinter.h
│ │ ├── ESPAsyncTCP.cpp
│ │ ├── ESPAsyncTCP.h
│ │ ├── ESPAsyncTCPbuffer.cpp
│ │ ├── ESPAsyncTCPbuffer.h
│ │ ├── SyncClient.cpp
│ │ ├── SyncClient.h
│ │ ├── async_config.h
│ │ ├── tcp_axtls.c
│ │ └── tcp_axtls.h
│ ├── ssl
│ │ ├── gen_server_cert.sh
│ │ ├── server.cer
│ │ └── server.key
│ └── travis
│ │ └── common.sh
├── LiquidCrystal_I2C_ID576
│ ├── .library.json
│ ├── LiquidCrystal_I2C.cpp
│ ├── LiquidCrystal_I2C.h
│ ├── README.md
│ ├── examples
│ │ ├── CustomChars
│ │ │ └── CustomChars.pde
│ │ ├── HelloWorld
│ │ │ └── HelloWorld.pde
│ │ └── SerialDisplay
│ │ │ └── SerialDisplay.pde
│ ├── keywords.txt
│ ├── library.json
│ └── library.properties
├── NtpClientLib_ID727
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .library.json
│ ├── Diagrama de estados.graphml
│ ├── LICENSE.md
│ ├── README.md
│ ├── examples
│ │ ├── NTPClientAvr
│ │ │ └── NTPClientAvr.ino
│ │ ├── NTPClientBasic
│ │ │ └── NTPClientBasic.ino
│ │ ├── NTPClientESP32
│ │ │ └── NTPClientESP32.ino
│ │ ├── NTPClientESP8266
│ │ │ └── NTPClientESP8266.ino
│ │ └── NTPClientMKR1000
│ │ │ └── NTPClientMKR1000.ino
│ ├── library.json
│ ├── library.properties
│ └── src
│ │ ├── NTPClientLib.cpp
│ │ └── NtpClientLib.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
├── OneWire_ID1
│ ├── .library.json
│ ├── OneWire.cpp
│ ├── OneWire.h
│ ├── 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
├── PCF8574_ESP-master
│ ├── LICENSE
│ ├── README.md
│ ├── examples
│ │ ├── pcf8574_arduinomicro
│ │ │ └── pcf8574_arduinomicro.ino
│ │ ├── pcf8574_attiny85_digispark
│ │ │ └── pcf8574_attiny85_digispark.ino
│ │ ├── pcf8574_esp8266
│ │ │ └── pcf8574_esp8266.ino
│ │ └── pcf8574_stm32f1
│ │ │ └── pcf8574_stm32f1.ino
│ ├── keywords.txt
│ ├── library.properties
│ ├── pcf8574_esp.cpp
│ └── pcf8574_esp.h
├── PID_AutoTune_v0
│ ├── Examples
│ │ └── AutoTune_Example
│ │ │ └── AutoTune_Example.pde
│ ├── PID_AutoTune_v0.cpp
│ └── PID_AutoTune_v0.h
├── PID_Lib
│ ├── 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
├── Timer
│ ├── DateStrings.cpp
│ ├── Readme.md
│ ├── Time.cpp
│ ├── 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
└── esp8266-react
│ ├── APSettingsService.cpp
│ ├── APSettingsService.h
│ ├── APStatus.cpp
│ ├── APStatus.h
│ ├── ArduinoJsonJWT.cpp
│ ├── ArduinoJsonJWT.h
│ ├── AsyncArduinoJson6.h
│ ├── AsyncJsonRequestWebHandler.h
│ ├── AsyncJsonWebHandler.h
│ ├── AuthenticationService.cpp
│ ├── AuthenticationService.h
│ ├── NTPStatus.cpp
│ ├── NTPStatus.h
│ ├── OTASettingsService.cpp
│ ├── OTASettingsService.h
│ ├── SecurityManager.cpp
│ ├── SecurityManager.h
│ ├── SecuritySettingsService.cpp
│ ├── SecuritySettingsService.h
│ ├── SettingsPersistence.h
│ ├── SettingsService.h
│ ├── SimpleService.h
│ ├── SystemStatus.cpp
│ ├── SystemStatus.h
│ ├── WiFiScanner.cpp
│ ├── WiFiScanner.h
│ ├── WiFiSettingsService.cpp
│ ├── WiFiSettingsService.h
│ ├── WiFiStatus.cpp
│ └── WiFiStatus.h
├── pio_upload.py
├── platformio.ini
├── set_version.py
├── src
├── ActiveStatus.cpp
├── ActiveStatus.h
├── BoilKettleHeaterService.cpp
├── BoilKettleHeaterService.h
├── BoilService.cpp
├── BoilService.h
├── BoilSettingsService.cpp
├── BoilSettingsService.h
├── BrewListService.h
├── BrewService.cpp
├── BrewService.h
├── BrewSettingsService.cpp
├── BrewSettingsService.h
├── Buzzer.cpp
├── Buzzer.h
├── HeaterService.h
├── KeyButton.h
├── Keyboard.cpp
├── Keyboard.h
├── Lcd.cpp
├── Lcd.h
├── MashKettleHeaterService.cpp
├── MashKettleHeaterService.h
├── MashService.cpp
├── MashService.h
├── MashSettingsService.cpp
├── MashSettingsService.h
├── NTPSettingsService.cpp
├── NTPSettingsService.h
├── Pump.cpp
├── Pump.h
├── SpargeKettleHeaterService.cpp
├── SpargeKettleHeaterService.h
├── TemperatureService.cpp
├── TemperatureService.h
├── enum.h
└── main.cpp
└── timelib_fix.py
/.gitignore:
--------------------------------------------------------------------------------
1 | .pioenvs
2 | .piolibdeps
3 | platformio.ini
4 | .clang_complete
5 | .gcc-flags.json
6 | *Thumbs.db
7 | /interface/build
8 | /interface/node_modules
9 | .vscode
10 | .pio
11 | .vscode/ipch/
12 | .vscode/.browse.c_cpp.db*
13 | .vscode/c_cpp_properties.json
14 | .vscode/launch.json
15 | node_modules/
16 | data/config/wifiSettings.json
17 | interface/.env.development
18 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2019 Bruno Leitão
2 | All rights reserved.
3 | This project is free to use. It's permitted to modify for personal use.
4 | It's not permitted to distribute the modified project. Modification can be
5 | distributed via the official BrewUNO release only. It's not permitted to distribute
6 | in a commercial way without permission.
7 |
8 | THE PROJECT IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
9 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
12 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
13 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14 | PROJECT OR THE USE OR OTHER DEALINGS IN THE PROJECT.
15 |
--------------------------------------------------------------------------------
/MakeFile:
--------------------------------------------------------------------------------
1 | .PHONY : push build pull push release setversion
2 |
3 | build: | pull
4 | platformio run
5 | cd interface;npm install;npm run build
6 | platformio run -v -t buildfs
7 |
8 | uploadfs:
9 | platformio run -t uploadfs
10 |
11 | uploadfw:
12 | platformio run -t upload
13 |
14 | monitor:
15 | platformio device monitor
16 |
17 | upload: | build
18 | platformio run -t uploadfs
19 | platformio run -t upload
20 |
21 | publish:
22 | rm -rf bin/
23 | mkdir bin/
24 | cp .pio/build/esp12e/firmware.bin bin/firmware_$(version).bin
25 | cp .pio/build/esp12e/spiffs.bin bin/spiffs_$(version).bin
26 |
27 | pull:
28 | git pull
29 |
30 | push:
31 | git add .
32 | git commit -am '$(message)'
33 | git push
34 |
35 | setversion:
36 | python set_version.py $(version)
37 |
38 | release: | build publish setversion push
--------------------------------------------------------------------------------
/bin/firmware_1.0.16.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/bin/firmware_1.0.16.bin
--------------------------------------------------------------------------------
/bin/spiffs_1.0.16.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/bin/spiffs_1.0.16.bin
--------------------------------------------------------------------------------
/data/config/activeStatus.json:
--------------------------------------------------------------------------------
1 | {
2 | "active_step": 0,
3 | "active_mash_step_index": -1,
4 | "active_boil_step_index": "",
5 | "boil_time": 0,
6 | "boil_target_temperature": 0,
7 | "start_time": 0,
8 | "end_time": 0,
9 | "time_now": 0,
10 | "target_temperature": 0,
11 | "brew_started": false,
12 | "recirculation": false,
13 | "boil_power_percentage": 0
14 | }
--------------------------------------------------------------------------------
/data/config/apSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "provision_mode": 1,
3 | "ssid": "BrewUNO",
4 | "password": "brew-uno"
5 | }
6 |
--------------------------------------------------------------------------------
/data/config/boilSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "st": [
3 | {
4 | "n": "1stHopBitter",
5 | "tm": 60,
6 | "a": 10
7 | },
8 | {
9 | "n": "2ndHopFlavor",
10 | "tm": 30,
11 | "a": 20
12 | },
13 | {
14 | "n": "3rtHopAroma",
15 | "tm": 15,
16 | "a": 30
17 | }
18 | ]
19 | }
--------------------------------------------------------------------------------
/data/config/brewSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "lg": "en",
3 | "bpp": 100,
4 | "btemp": 99.1,
5 | "bt": 60,
6 | "kP": 1100,
7 | "kI": 3.5,
8 | "kD": 0,
9 | "pri": 300,
10 | "prt": 60,
11 | "mhp": 66,
12 | "es": false,
13 | "st": 75,
14 | "spp": 100,
15 | "ps": 0.5,
16 | "mso": 0,
17 | "sso": 0,
18 | "bso": 0,
19 | "tu": "C",
20 | "ip": false,
21 | "pa": 0
22 | }
--------------------------------------------------------------------------------
/data/config/mashSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "st": [
3 | {
4 | "n": "PreMash",
5 | "t": 52,
6 | "tm": 1,
7 | "r": true,
8 | "sl": false,
9 | "ho": true,
10 | "fp": true
11 | },
12 | {
13 | "n": "MashIn",
14 | "t": 50,
15 | "tm": 0,
16 | "r": false,
17 | "sl": true,
18 | "ho": false,
19 | "fp": false
20 | },
21 | {
22 | "n": "MashOne",
23 | "t": 50,
24 | "tm": 35,
25 | "r": true,
26 | "sl": false,
27 | "ho": true,
28 | "fp": false
29 | },
30 | {
31 | "n": "MashTwo",
32 | "t": 64,
33 | "tm": 55,
34 | "r": true,
35 | "sl": true,
36 | "ho": true,
37 | "fp": false
38 | },
39 | {
40 | "n": "MashOut",
41 | "t": 78,
42 | "tm": 5,
43 | "r": true,
44 | "sl": true,
45 | "ho": true,
46 | "fp": false
47 | }
48 | ]
49 | }
--------------------------------------------------------------------------------
/data/config/ntpSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "server":"a.st1.ntp.br",
3 | "interval":3600
4 | }
5 |
--------------------------------------------------------------------------------
/data/config/otaSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "enabled": false,
3 | "port": 8266,
4 | "password": "brewuno"
5 | }
--------------------------------------------------------------------------------
/data/config/wifiSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ssid": "ssid",
3 | "password": "password",
4 | "hostname": "BrewUNO",
5 | "static_ip_config": false
6 | }
7 |
--------------------------------------------------------------------------------
/data/www/app/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/app/icon.png
--------------------------------------------------------------------------------
/data/www/app/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/app/logo.png
--------------------------------------------------------------------------------
/data/www/app/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"BrewUNO",
3 | "icons":[
4 | {
5 | "src":"/app/icon.png",
6 | "sizes":"48x48 72x72 96x96 128x128 256x256"
7 | }
8 | ],
9 | "start_url":"/",
10 | "display":"fullscreen",
11 | "orientation":"any"
12 | }
13 |
--------------------------------------------------------------------------------
/data/www/css/roboto.css:
--------------------------------------------------------------------------------
1 | /* Just supporting latin due to size constrains on the esp chip */
2 | @font-face {
3 | font-family: 'Roboto';
4 | font-style: normal;
5 | font-weight: 300;
6 | src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/ro-li.w2) format('woff2');
7 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
8 | }
9 | @font-face {
10 | font-family: 'Roboto';
11 | font-style: normal;
12 | font-weight: 400;
13 | src: local('Roboto'), local('Roboto-Regular'), url(../fonts/ro-re.w2) format('woff2');
14 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
15 | }
16 | @font-face {
17 | font-family: 'Roboto';
18 | font-style: normal;
19 | font-weight: 500;
20 | src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/ro-me.w2) format('woff2');
21 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
22 | }
--------------------------------------------------------------------------------
/data/www/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/favicon.ico
--------------------------------------------------------------------------------
/data/www/fonts/ro-li.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/fonts/ro-li.w2
--------------------------------------------------------------------------------
/data/www/fonts/ro-me.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/fonts/ro-me.w2
--------------------------------------------------------------------------------
/data/www/fonts/ro-re.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/fonts/ro-re.w2
--------------------------------------------------------------------------------
/data/www/index.html:
--------------------------------------------------------------------------------
1 |
BrewUNO
--------------------------------------------------------------------------------
/data/www/js/0.20a3.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/js/0.20a3.js.gz
--------------------------------------------------------------------------------
/data/www/js/1.b351.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/js/1.b351.js.gz
--------------------------------------------------------------------------------
/data/www/js/2.60b4.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/data/www/js/2.60b4.js.gz
--------------------------------------------------------------------------------
/interface/.env.development:
--------------------------------------------------------------------------------
1 | REACT_APP_ENDPOINT_ROOT=http://192.168.15.20/rest/
--------------------------------------------------------------------------------
/interface/.env.production:
--------------------------------------------------------------------------------
1 | REACT_APP_ENDPOINT_ROOT=/rest/
2 | GENERATE_SOURCEMAP=false
--------------------------------------------------------------------------------
/interface/build/app/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/build/app/icon.png
--------------------------------------------------------------------------------
/interface/build/app/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"BrewUNO",
3 | "icons":[
4 | {
5 | "src":"/app/icon.png",
6 | "sizes":"48x48 72x72 96x96 128x128 256x256"
7 | }
8 | ],
9 | "start_url":"/",
10 | "display":"fullscreen",
11 | "orientation":"any"
12 | }
13 |
--------------------------------------------------------------------------------
/interface/build/css/roboto.css:
--------------------------------------------------------------------------------
1 | /* Just supporting latin due to size constrains on the esp chip */
2 | @font-face {
3 | font-family: 'Roboto';
4 | font-style: normal;
5 | font-weight: 300;
6 | src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/ro-li.w2) format('woff2');
7 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
8 | }
9 | @font-face {
10 | font-family: 'Roboto';
11 | font-style: normal;
12 | font-weight: 400;
13 | src: local('Roboto'), local('Roboto-Regular'), url(../fonts/ro-re.w2) format('woff2');
14 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
15 | }
16 | @font-face {
17 | font-family: 'Roboto';
18 | font-style: normal;
19 | font-weight: 500;
20 | src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/ro-me.w2) format('woff2');
21 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
22 | }
--------------------------------------------------------------------------------
/interface/build/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/build/favicon.ico
--------------------------------------------------------------------------------
/interface/build/fonts/ro-li.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/build/fonts/ro-li.w2
--------------------------------------------------------------------------------
/interface/build/fonts/ro-me.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/build/fonts/ro-me.w2
--------------------------------------------------------------------------------
/interface/build/fonts/ro-re.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/build/fonts/ro-re.w2
--------------------------------------------------------------------------------
/interface/build/index.html:
--------------------------------------------------------------------------------
1 | BrewUNO
--------------------------------------------------------------------------------
/interface/config-overrides.js:
--------------------------------------------------------------------------------
1 | const ManifestPlugin = require('webpack-manifest-plugin');
2 | const WorkboxWebpackPlugin = require('workbox-webpack-plugin');
3 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4 | const CompressionPlugin = require("compression-webpack-plugin");
5 |
6 | const path = require('path');
7 | const fs = require('fs');
8 |
9 | module.exports = function override(config, env) {
10 | if (env === "production") {
11 | // rename the ouput file, we need it's path to be short, for SPIFFS
12 | config.output.filename = 'js/[id].[chunkhash:4].js';
13 | config.output.chunkFilename = 'js/[id].[chunkhash:4].js';
14 |
15 | // take out the manifest and service worker plugins
16 | config.plugins = config.plugins.filter(plugin => !(plugin instanceof ManifestPlugin));
17 | config.plugins = config.plugins.filter(plugin => !(plugin instanceof WorkboxWebpackPlugin.GenerateSW));
18 |
19 | // shorten css filenames
20 | const miniCssExtractPlugin = config.plugins.find((plugin) => plugin instanceof MiniCssExtractPlugin);
21 | miniCssExtractPlugin.options.filename = "css/[id].[contenthash:4].css";
22 | miniCssExtractPlugin.options.chunkFilename = "css/[id].[contenthash:4].c.css";
23 |
24 | // add compression plugin, compress javascript
25 | config.plugins.push(new CompressionPlugin({
26 | filename: "[path].gz[query]",
27 | algorithm: "gzip",
28 | test: /\.(js)$/,
29 | deleteOriginalAssets: true
30 | }));
31 | }
32 | return config;
33 | }
34 |
--------------------------------------------------------------------------------
/interface/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "BrewUNO",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@material-ui/core": "^3.9.3",
7 | "@material-ui/icons": "^3.0.2",
8 | "@material-ui/lab": "^3.0.0-alpha.30",
9 | "compression-webpack-plugin": "^2.0.0",
10 | "i18n-react": "^0.7.0",
11 | "js-cookie": "^2.2.1",
12 | "material-ui-popup-state": "^1.4.0",
13 | "moment": "^2.24.0",
14 | "notistack": "^0.8.6",
15 | "npm": "^6.9.0",
16 | "prop-types": "^15.7.2",
17 | "rc-progress": "^2.5.1",
18 | "rc-slider": "^8.6.13",
19 | "react": "^16.8.6",
20 | "react-copy-to-clipboard": "^5.0.1",
21 | "react-dom": "^16.8.6",
22 | "react-form-validator-core": "^0.6.2",
23 | "react-ga": "^2.7.0",
24 | "react-input-mask": "^2.0.4",
25 | "react-jss": "^8.6.1",
26 | "react-material-ui-form-validator": "^2.0.7",
27 | "react-router": "^5.0.0",
28 | "react-router-dom": "^5.0.0",
29 | "react-scripts": "2.1.8",
30 | "react-sortable-hoc": "^0.8.4",
31 | "recharts": "^1.4.2"
32 | },
33 | "scripts": {
34 | "start": "react-app-rewired start",
35 | "build": "react-app-rewired build && rm -rf ../data/www && cp -r build ../data/www",
36 | "test": "react-app-rewired test --env=jsdom",
37 | "eject": "react-scripts eject"
38 | },
39 | "devDependencies": {
40 | "react-app-rewired": "^2.1.1"
41 | },
42 | "browserslist": [
43 | ">0.2%",
44 | "not dead",
45 | "not ie <= 11",
46 | "not op_mini all"
47 | ]
48 | }
49 |
--------------------------------------------------------------------------------
/interface/public/app/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/public/app/icon.png
--------------------------------------------------------------------------------
/interface/public/app/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/public/app/logo.png
--------------------------------------------------------------------------------
/interface/public/app/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"BrewUNO",
3 | "icons":[
4 | {
5 | "src":"/app/icon.png",
6 | "sizes":"48x48 72x72 96x96 128x128 256x256"
7 | }
8 | ],
9 | "start_url":"/",
10 | "display":"fullscreen",
11 | "orientation":"any"
12 | }
13 |
--------------------------------------------------------------------------------
/interface/public/css/roboto.css:
--------------------------------------------------------------------------------
1 | /* Just supporting latin due to size constrains on the esp chip */
2 | @font-face {
3 | font-family: 'Roboto';
4 | font-style: normal;
5 | font-weight: 300;
6 | src: local('Roboto Light'), local('Roboto-Light'), url(../fonts/ro-li.w2) format('woff2');
7 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
8 | }
9 | @font-face {
10 | font-family: 'Roboto';
11 | font-style: normal;
12 | font-weight: 400;
13 | src: local('Roboto'), local('Roboto-Regular'), url(../fonts/ro-re.w2) format('woff2');
14 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
15 | }
16 | @font-face {
17 | font-family: 'Roboto';
18 | font-style: normal;
19 | font-weight: 500;
20 | src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/ro-me.w2) format('woff2');
21 | unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+2215;
22 | }
--------------------------------------------------------------------------------
/interface/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/public/favicon.ico
--------------------------------------------------------------------------------
/interface/public/fonts/ro-li.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/public/fonts/ro-li.w2
--------------------------------------------------------------------------------
/interface/public/fonts/ro-me.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/public/fonts/ro-me.w2
--------------------------------------------------------------------------------
/interface/public/fonts/ro-re.w2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/interface/public/fonts/ro-re.w2
--------------------------------------------------------------------------------
/interface/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | BrewUNO
9 |
10 |
11 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/interface/src/AppRouting.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | import { Route, Redirect, Switch } from 'react-router';
4 |
5 | // containers
6 | import WiFiConfiguration from './containers/WiFiConfiguration';
7 | import NTPConfiguration from './containers/NTPConfiguration';
8 | import OTAConfiguration from './containers/OTAConfiguration';
9 | import APConfiguration from './containers/APConfiguration';
10 | import BrewConfiguration from './containers/BrewConfiguration';
11 | import BrewDayConfiguration from './containers/BrewDayConfiguration';
12 | import AboutContainer from './containers/AboutContainer';
13 |
14 | class AppRouting extends Component {
15 | render() {
16 | return (
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | )
28 | }
29 | }
30 |
31 | export default AppRouting;
32 |
--------------------------------------------------------------------------------
/interface/src/components/IntText.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import T from 'i18n-react';
3 | import en from "../language/en.json"
4 | import deDE from "../language/de-DE.json"
5 | import ptBR from "../language/pt-BR.json"
6 | import ruRU from "../language/ru-RU.json"
7 | import esES from "../language/es-ES.json"
8 |
9 | class IntText extends Component {
10 | constructor(props) {
11 | super(props)
12 | }
13 |
14 | SetText(lang) {
15 | switch (lang) {
16 | case "pt-BR":
17 | T.setTexts(ptBR)
18 | break
19 | case "de-DE":
20 | T.setTexts(deDE);
21 | break
22 | case "en":
23 | T.setTexts(en);
24 | break
25 | case "ru-RU":
26 | T.setTexts(ruRU);
27 | break
28 | case "es-ES":
29 | T.setTexts(esES);
30 | break
31 | default:
32 | T.setTexts(en)
33 | break
34 | }
35 | this.forceUpdate()
36 | }
37 |
38 | render() {
39 | return (
40 |
41 | {this.props.spaceBefore ? ' ' : null}
42 |
43 | {this.props.spaceAfter ? ' ' : null}
44 |
45 | )
46 | }
47 | }
48 |
49 | export default IntText;
--------------------------------------------------------------------------------
/interface/src/components/SectionContent.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import PropTypes from 'prop-types';
3 |
4 | import Paper from '@material-ui/core/Paper';
5 | import { withStyles } from '@material-ui/core/styles';
6 | import Typography from '@material-ui/core/Typography';
7 |
8 | const styles = theme => ({
9 | content: {
10 | padding: theme.spacing.unit * 1.5,
11 | margin: theme.spacing.unit * 1.5,
12 | minWidth: 350,
13 | }
14 |
15 | });
16 |
17 | function SectionContent(props) {
18 | const { children, classes, title } = props;
19 | return (
20 |
21 | {title != '' ?
22 |
23 |
24 | {title}
25 |
26 |
27 | : null}
28 |
29 | {children}
30 |
31 |
32 |
33 | );
34 | }
35 |
36 | SectionContent.propTypes = {
37 | classes: PropTypes.object.isRequired,
38 | children: PropTypes.oneOfType([
39 | PropTypes.arrayOf(PropTypes.node),
40 | PropTypes.node
41 | ]).isRequired,
42 | title: PropTypes.string.isRequired
43 | };
44 |
45 | export default withStyles(styles)(SectionContent);
46 |
--------------------------------------------------------------------------------
/interface/src/components/Tracking.js:
--------------------------------------------------------------------------------
1 | import ReactGA from 'react-ga';
2 |
3 | export const initGA = (trackingID) => {
4 | ReactGA.initialize(trackingID);
5 | }
6 |
7 | export const PageView = () => {
8 | ReactGA.pageview(window.location.pathname +
9 | window.location.search);
10 | }
11 |
12 | /**
13 | * Event - Add custom tracking event.
14 | * @param {string} category
15 | * @param {string} action
16 | * @param {string} label
17 | */
18 | export const Event = (category, action, label) => {
19 | ReactGA.event({
20 | category: category,
21 | action: action,
22 | label: label
23 | });
24 | };
--------------------------------------------------------------------------------
/interface/src/components/Utils.js:
--------------------------------------------------------------------------------
1 | export const getDateTime = (seconds) => {
2 | var date = new Date(0);
3 | date.setUTCSeconds(seconds);
4 | return date;
5 | }
6 |
7 | export const pad = (n, width, z) => {
8 | z = z || '0';
9 | n = n + '';
10 | return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
11 | }
12 |
13 | export const ExecuteRestCall = (url, method, callback, callbackError, props) => {
14 | fetch(url, {
15 | method: method,
16 | headers: {
17 | 'Accept': 'application/json',
18 | 'Content-Type': 'application/json',
19 | },
20 | }).then(response => {
21 | if (response.ok) {
22 | response.json()
23 | .catch(() => {
24 | if (props != undefined && props.enqueueSnackbar != undefined)
25 | props.enqueueSnackbar("Invalid json result", { variant: 'error', autoHideDuration: 2000, });
26 | })
27 | .then(json => callback(json));
28 | return;
29 | }
30 | if (props != undefined && props.enqueueSnackbar != undefined)
31 | response.json().then(json => props.enqueueSnackbar(json.message, { variant: 'info', autoHideDuration: 2000, }));
32 | }).catch(error => {
33 | if (props != undefined && props.enqueueSnackbar != undefined)
34 | props.enqueueSnackbar("Problem getting resource: " + error.message, { variant: 'error', autoHideDuration: 2000, });
35 | if (callbackError) {
36 | callbackError()
37 | }
38 | });
39 | }
--------------------------------------------------------------------------------
/interface/src/constants/Highlight.js:
--------------------------------------------------------------------------------
1 | export const IDLE = "idle";
2 | export const SUCCESS = "success";
3 | export const ERROR = "error";
4 | export const WARN = "warn";
5 |
--------------------------------------------------------------------------------
/interface/src/constants/NTPStatus.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import * as Highlight from '../constants/Highlight';
3 | import IntText from '../components/IntText'
4 |
5 | export const NTP_TIME_NOT_SET = 0;
6 | export const NTP_TIME_NEEDS_SYNC = 1;
7 | export const NTP_TIME_SET = 2;
8 |
9 | export const isSynchronized = ntpStatus => ntpStatus && (ntpStatus.status === NTP_TIME_NEEDS_SYNC || ntpStatus.status === NTP_TIME_SET);
10 |
11 | export const ntpStatusHighlight = ntpStatus => {
12 | switch (ntpStatus.status) {
13 | case NTP_TIME_SET:
14 | return Highlight.SUCCESS;
15 | case NTP_TIME_NEEDS_SYNC:
16 | return Highlight.WARN;
17 | case NTP_TIME_NOT_SET:
18 | default:
19 | return Highlight.ERROR;
20 | }
21 | }
22 |
23 | export const ntpStatus = ntpStatus => {
24 | switch (ntpStatus.status) {
25 | case NTP_TIME_SET:
26 | return ;
27 | case NTP_TIME_NEEDS_SYNC:
28 | return ;
29 | case NTP_TIME_NOT_SET:
30 | return ;
31 | default:
32 | return ;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/interface/src/constants/TimeFormat.js:
--------------------------------------------------------------------------------
1 | import moment from 'moment';
2 |
3 | export const TIME_AND_DATE = 'DD/MM/YYYY HH:mm:ss';
4 | export const unixTimeToTimeAndDate = unixTime => moment.unix(unixTime).format(TIME_AND_DATE);
5 |
--------------------------------------------------------------------------------
/interface/src/constants/WiFiAPModes.js:
--------------------------------------------------------------------------------
1 | export const WIFI_AP_MODE_ALWAYS = 0;
2 | export const WIFI_AP_MODE_DISCONNECTED = 1;
3 | export const WIFI_AP_NEVER = 2;
4 |
5 | export const isAPEnabled = apMode => apMode === WIFI_AP_MODE_ALWAYS || apMode === WIFI_AP_MODE_DISCONNECTED;
6 |
--------------------------------------------------------------------------------
/interface/src/constants/WiFiConnectionStatus.js:
--------------------------------------------------------------------------------
1 | import * as Highlight from '../constants/Highlight';
2 |
3 | export const WIFI_STATUS_IDLE = 0;
4 | export const WIFI_STATUS_NO_SSID_AVAIL = 1;
5 | export const WIFI_STATUS_CONNECTED = 3;
6 | export const WIFI_STATUS_CONNECT_FAILED = 4;
7 | export const WIFI_STATUS_CONNECTION_LOST = 5;
8 | export const WIFI_STATUS_DISCONNECTED = 6;
9 |
10 | export const isConnected = wifiStatus => wifiStatus && wifiStatus.status === WIFI_STATUS_CONNECTED;
11 |
12 | export const connectionStatusHighlight = wifiStatus => {
13 | switch (wifiStatus.status){
14 | case WIFI_STATUS_IDLE:
15 | case WIFI_STATUS_DISCONNECTED:
16 | return Highlight.IDLE;
17 | case WIFI_STATUS_CONNECTED:
18 | return Highlight.SUCCESS;
19 | case WIFI_STATUS_CONNECT_FAILED:
20 | case WIFI_STATUS_CONNECTION_LOST:
21 | return Highlight.ERROR;
22 | default:
23 | return Highlight.WARN;
24 | }
25 | }
26 |
27 | export const connectionStatus = wifiStatus => {
28 | switch (wifiStatus.status){
29 | case WIFI_STATUS_IDLE:
30 | return "Idle";
31 | case WIFI_STATUS_NO_SSID_AVAIL:
32 | return "No SSID Available";
33 | case WIFI_STATUS_CONNECTED:
34 | return "Connected";
35 | case WIFI_STATUS_CONNECT_FAILED:
36 | return "Connection Failed";
37 | case WIFI_STATUS_CONNECTION_LOST:
38 | return "Connection Lost";
39 | case WIFI_STATUS_DISCONNECTED:
40 | return "Disconnected";
41 | default:
42 | return "Unknown";
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/interface/src/constants/WiFiSecurityModes.js:
--------------------------------------------------------------------------------
1 | export const WIFI_AUTH_OPEN = 0;
2 | export const WIFI_AUTH_WEP = 1;
3 | export const WIFI_AUTH_WEP_PSK = 2;
4 | export const WIFI_AUTH_WEP2_PSK = 3;
5 | export const WIFI_AUTH_WPA_WPA2_PSK = 4;
6 | export const WIFI_AUTH_WPA2_ENTERPRISE = 5;
7 |
8 | export const isNetworkOpen = selectedNetwork => selectedNetwork && selectedNetwork.encryption_type === WIFI_AUTH_OPEN;
9 |
10 | export const networkSecurityMode = selectedNetwork => {
11 | switch (selectedNetwork.encryption_type){
12 | case WIFI_AUTH_WEP:
13 | case WIFI_AUTH_WEP_PSK:
14 | return "WEP";
15 | case WIFI_AUTH_WEP2_PSK:
16 | return "WEP2";
17 | case WIFI_AUTH_WPA_WPA2_PSK:
18 | return "WPA/WEP2";
19 | case WIFI_AUTH_WPA2_ENTERPRISE:
20 | return "WEP2 Enterprise";
21 | case WIFI_AUTH_OPEN:
22 | return "None";
23 | default:
24 | return "Unknown";
25 | }
26 | }
--------------------------------------------------------------------------------
/interface/src/containers/APConfiguration.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import Tabs from '@material-ui/core/Tabs';
3 | import Tab from '@material-ui/core/Tab';
4 | import MenuAppBar from '../components/MenuAppBar';
5 | import APSettings from './APSettings';
6 | import APStatus from './APStatus';
7 | import { PageView, initGA, Event } from '../components/Tracking'
8 |
9 | class APConfiguration extends Component {
10 |
11 | constructor(props) {
12 | super(props);
13 | this.state = {
14 | selectedTab: "apStatus",
15 | selectedNetwork: null
16 | };
17 | }
18 |
19 | componentDidMount() {
20 | initGA('UA-149477072-2');
21 | PageView();
22 | }
23 |
24 | handleTabChange = (event, selectedTab) => {
25 | this.setState({ selectedTab });
26 | };
27 |
28 | render() {
29 | const { selectedTab } = this.state;
30 | return (
31 |
32 |
33 |
34 |
35 |
36 | {selectedTab === "apStatus" && }
37 | {selectedTab === "apSettings" && }
38 |
39 | )
40 | }
41 | }
42 |
43 | export default APConfiguration;
44 |
--------------------------------------------------------------------------------
/interface/src/containers/APSettings.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | import { AP_SETTINGS_ENDPOINT } from '../constants/Endpoints';
4 | import { restComponent } from '../components/RestComponent';
5 | import SectionContent from '../components/SectionContent';
6 | import APSettingsForm from '../forms/APSettingsForm';
7 |
8 | import IntText from '../components/IntText'
9 |
10 | class APSettings extends Component {
11 |
12 | componentDidMount() {
13 | this.props.loadData();
14 | }
15 |
16 | render() {
17 | const { data, fetched, errorMessage } = this.props;
18 | return (
19 | }>
20 |
28 |
29 | )
30 | }
31 |
32 | }
33 |
34 | export default restComponent(AP_SETTINGS_ENDPOINT, APSettings);
35 |
--------------------------------------------------------------------------------
/interface/src/containers/AboutContainer.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import MenuAppBar from '../components/MenuAppBar';
3 | import About from './About'
4 | import { PageView, initGA, Event } from '../components/Tracking'
5 | import IntText from '../components/IntText'
6 |
7 | class AboutContainer extends Component {
8 | constructor() {
9 | super();
10 | }
11 |
12 | componentDidMount() {
13 | initGA('UA-149477072-2');
14 | PageView();
15 | }
16 |
17 | render() {
18 | const { data, fetched, errorMessage } = this.props;
19 | return (
20 | }>
21 |
22 |
23 | )
24 | }
25 | }
26 |
27 | export default AboutContainer
28 |
--------------------------------------------------------------------------------
/interface/src/containers/BrewDayConfiguration.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import MenuAppBar from '../components/MenuAppBar';
3 | import Brew from './Brew'
4 | import { PageView, initGA, Event } from '../components/Tracking'
5 |
6 | class BrewConfiguration extends Component {
7 | constructor() {
8 | super();
9 | }
10 |
11 | componentDidMount() {
12 | initGA('UA-149477072-2');
13 | PageView();
14 | }
15 |
16 | render() {
17 | return (
18 |
19 |
20 |
21 | )
22 | }
23 | }
24 |
25 | export default BrewConfiguration
26 |
--------------------------------------------------------------------------------
/interface/src/containers/NTPConfiguration.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import MenuAppBar from '../components/MenuAppBar';
3 | import NTPSettings from './NTPSettings';
4 | import NTPStatus from './NTPStatus';
5 | import Tabs from '@material-ui/core/Tabs';
6 | import Tab from '@material-ui/core/Tab';
7 | import IntText from '../components/IntText'
8 | import { PageView, initGA, Event } from '../components/Tracking'
9 |
10 | class NTPConfiguration extends Component {
11 |
12 | constructor(props) {
13 | super(props);
14 | this.state = {
15 | selectedTab: "ntpStatus"
16 | };
17 | }
18 |
19 | componentDidMount() {
20 | initGA('UA-149477072-2');
21 | PageView();
22 | }
23 |
24 | handleTabChange = (event, selectedTab) => {
25 | this.setState({ selectedTab });
26 | };
27 |
28 | render() {
29 | const { selectedTab } = this.state;
30 | return (
31 | }>
32 |
33 | } />
34 | } />
35 |
36 | {selectedTab === "ntpStatus" && }
37 | {selectedTab === "ntpSettings" && }
38 |
39 | )
40 | }
41 | }
42 |
43 | export default NTPConfiguration
44 |
--------------------------------------------------------------------------------
/interface/src/containers/NTPSettings.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | import { NTP_SETTINGS_ENDPOINT } from '../constants/Endpoints';
4 | import { restComponent } from '../components/RestComponent';
5 | import SectionContent from '../components/SectionContent';
6 | import NTPSettingsForm from '../forms/NTPSettingsForm';
7 |
8 | import IntText from '../components/IntText'
9 |
10 | class NTPSettings extends Component {
11 |
12 | componentDidMount() {
13 | this.props.loadData();
14 | }
15 |
16 | render() {
17 | const { data, fetched, errorMessage } = this.props;
18 | return (
19 | }>
20 |
28 |
29 | )
30 | }
31 |
32 | }
33 |
34 | export default restComponent(NTP_SETTINGS_ENDPOINT, NTPSettings);
35 |
--------------------------------------------------------------------------------
/interface/src/containers/OTAConfiguration.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import MenuAppBar from '../components/MenuAppBar';
3 | import OTASettings from './OTASettings';
4 | import { PageView, initGA, Event } from '../components/Tracking'
5 | import IntText from '../components/IntText'
6 |
7 | class OTAConfiguration extends Component {
8 | componentDidMount() {
9 | initGA('UA-149477072-2');
10 | PageView();
11 | }
12 |
13 | render() {
14 | return (
15 | }>
16 |
17 |
18 | )
19 | }
20 | }
21 |
22 | export default OTAConfiguration
23 |
--------------------------------------------------------------------------------
/interface/src/containers/OTASettings.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | import { OTA_SETTINGS_ENDPOINT } from '../constants/Endpoints';
4 | import {restComponent} from '../components/RestComponent';
5 | import SectionContent from '../components/SectionContent';
6 | import OTASettingsForm from '../forms/OTASettingsForm';
7 |
8 | import IntText from '../components/IntText'
9 |
10 | class OTASettings extends Component {
11 |
12 | componentDidMount() {
13 | this.props.loadData();
14 | }
15 |
16 | render() {
17 | const { data, fetched, errorMessage } = this.props;
18 | return (
19 | }>
20 |
29 |
30 | )
31 | }
32 |
33 | }
34 |
35 | export default restComponent(OTA_SETTINGS_ENDPOINT, OTASettings);
36 |
--------------------------------------------------------------------------------
/interface/src/history.js:
--------------------------------------------------------------------------------
1 | import { createBrowserHistory } from 'history';
2 |
3 | export default createBrowserHistory({
4 | /* pass a configuration object here if needed */
5 | })
6 |
--------------------------------------------------------------------------------
/interface/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from 'react-dom';
3 | import history from './history';
4 | import { Router, Route, Redirect, Switch } from 'react-router';
5 | import App from './App';
6 |
7 | render((
8 |
9 |
10 |
11 |
12 |
13 |
14 | ), document.getElementById("root"))
15 |
--------------------------------------------------------------------------------
/interface/src/style/BrewStyle.js:
--------------------------------------------------------------------------------
1 | const BrewStyles = theme => ({
2 | loadingSettings: {
3 | margin: theme.spacing.unit,
4 | },
5 | loadingSettingsDetails: {
6 | margin: theme.spacing.unit * 4,
7 | textAlign: "center"
8 | },
9 | button: {
10 | margin: theme.spacing.unit * 0.45,
11 | padding: theme.spacing.unit * 0.7,
12 | },
13 | button_icons: {
14 | marginRight: theme.spacing.unit * 0,
15 | padding: 0,
16 | },
17 | button_pump: {
18 | marginRight: theme.spacing.unit * 0.33,
19 | padding: 0,
20 | },
21 | button_pop: {
22 | marginRight: theme.spacing.unit * 0.5,
23 | padding: 2,
24 | },
25 | input: {
26 | display: 'none',
27 | },
28 | gadgetCard: {
29 | background: "#303030",
30 | },
31 | slider: {
32 | padding: '22px 0px',
33 | },
34 | sliderThumb: {
35 | background: '#fff',
36 | },
37 | trackBefore: {
38 | background: '#536dfe',
39 | },
40 | trackAfter: {
41 | background: '#fff',
42 | },
43 | brewSettingsCard: {
44 | background: "#303030",
45 | },
46 | chartCard: {
47 | background: "#262626",
48 | },
49 | pumpColor1: {
50 | color: "#447bd6",
51 | },
52 | pumpColor2: {
53 | color: "#5c94f2",
54 | },
55 | });
56 |
57 | export default BrewStyles;
--------------------------------------------------------------------------------
/interface/src/validators/isHostname.js:
--------------------------------------------------------------------------------
1 | const hostnameLengthRegex = /^.{0,32}$/
2 | const hostnamePatternRegex = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/
3 |
4 | export default function isHostname(hostname) {
5 | return hostnameLengthRegex.test(hostname) && hostnamePatternRegex.test(hostname);
6 | }
7 |
--------------------------------------------------------------------------------
/interface/src/validators/isIP.js:
--------------------------------------------------------------------------------
1 | const ipAddressRegexp = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/
2 |
3 | export default function isIp(ipAddress) {
4 | return ipAddressRegexp.test(ipAddress);
5 | }
--------------------------------------------------------------------------------
/interface/src/validators/optional.js:
--------------------------------------------------------------------------------
1 | export default validator => value => !value || validator(value);
--------------------------------------------------------------------------------
/interface/src/validators/or.js:
--------------------------------------------------------------------------------
1 | export default (validator1, validator2) => value => validator1(value) || validator2(value);
2 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/.clang-format:
--------------------------------------------------------------------------------
1 | # http://clang.llvm.org/docs/ClangFormatStyleOptions.html
2 |
3 | BasedOnStyle: Google
4 | Standard: Cpp03
5 | AllowShortFunctionsOnASingleLine: Empty
6 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sh text eol=lf
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
15 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | /.idea
3 | /build
4 | /bin
5 | /lib
6 | /sftp-config.json
7 | .tags
8 | .tags_sorted_by_file
9 | /fuzzing/*_fuzzer
10 | /fuzzing/*_fuzzer.options
11 | /fuzzing/*_fuzzer_seed_corpus.zip
12 | .vs/
13 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/.library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ArduinoJson",
3 | "keywords": [
4 | "json",
5 | "rest",
6 | "http",
7 | "web"
8 | ],
9 | "description": "An elegant and efficient JSON library for embedded systems",
10 | "homepage": "https://arduinojson.org/?utm_source=meta&utm_medium=library.json",
11 | "repository": {
12 | "type": "git",
13 | "url": "https://github.com/bblanchon/ArduinoJson.git"
14 | },
15 | "version": "6.11.0",
16 | "authors": [
17 | {
18 | "email": null,
19 | "url": "https://blog.benoitblanchon.fr",
20 | "maintainer": false,
21 | "name": "Benoit Blanchon"
22 | }
23 | ],
24 | "frameworks": [
25 | "arduino"
26 | ],
27 | "platforms": [
28 | "atmelavr",
29 | "atmelsam",
30 | "espressif32",
31 | "espressif8266",
32 | "infineonxmc",
33 | "intel_arc32",
34 | "kendryte210",
35 | "microchippic32",
36 | "nordicnrf51",
37 | "nordicnrf52",
38 | "ststm32",
39 | "ststm8",
40 | "teensy",
41 | "timsp430"
42 | ],
43 | "export": {
44 | "exclude": [
45 | "fuzzing",
46 | "scripts",
47 | "test",
48 | "third-party"
49 | ]
50 | },
51 | "id": 64
52 | }
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/.mbedignore:
--------------------------------------------------------------------------------
1 | .github/
2 | examples/
3 | fuzzing/
4 | scripts/
5 | test/
6 | third-party/
7 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/ArduinoJson.h:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #include "src/ArduinoJson.h"
6 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # ArduinoJson - arduinojson.org
2 | # Copyright Benoit Blanchon 2014-2019
3 | # MIT License
4 |
5 | cmake_minimum_required(VERSION 3.0)
6 | project(ArduinoJson)
7 |
8 | enable_testing()
9 |
10 | add_definitions(-DARDUINOJSON_DEBUG)
11 | if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
12 | add_compile_options(-g -O0)
13 | endif()
14 |
15 | if(${COVERAGE})
16 | set(CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage")
17 | endif()
18 |
19 | include_directories(${CMAKE_CURRENT_LIST_DIR}/src)
20 | add_subdirectory(third-party/catch)
21 | add_subdirectory(test)
22 | add_subdirectory(fuzzing)
23 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 | ---------------------
3 |
4 | Copyright © 2014-2019 Benoit BLANCHON
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7 |
8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9 |
10 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/SUPPORT.md:
--------------------------------------------------------------------------------
1 | # ArduinoJson Support
2 |
3 | First off, thank you very much for using ArduinoJson.
4 |
5 | We'll be very happy to help you, but first please read the following.
6 |
7 | ## Before asking for help
8 |
9 | 1. Read the [FAQ](https://arduinojson.org/faq/?utm_source=github&utm_medium=support)
10 | 2. Search in the [API Reference](https://arduinojson.org/api/?utm_source=github&utm_medium=support)
11 |
12 | If you did not find the answer, please create a [new issue on GitHub](https://github.com/bblanchon/ArduinoJson/issues/new).
13 |
14 | It is OK to add a comment to a currently opened issue, but please avoid adding comments to a closed issue.
15 |
16 | ## Before hitting the Submit button
17 |
18 | Please provide all the relevant information:
19 |
20 | * Good title
21 | * Short description of the problem
22 | * Target platform
23 | * Compiler model and version
24 | * [MVCE](https://stackoverflow.com/help/mcve)
25 | * Compiler output
26 |
27 | Good questions get fast answers!
28 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: 6.11.0.{build}
2 | environment:
3 | matrix:
4 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
5 | CMAKE_GENERATOR: Visual Studio 15 2017
6 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
7 | CMAKE_GENERATOR: Visual Studio 14 2015
8 | - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
9 | CMAKE_GENERATOR: Visual Studio 12 2013
10 | - CMAKE_GENERATOR: Visual Studio 11 2012
11 | - CMAKE_GENERATOR: Visual Studio 10 2010
12 | - CMAKE_GENERATOR: MinGW Makefiles
13 | configuration: Debug
14 | before_build:
15 | - set PATH=C:\MinGW\bin;%PATH:C:\Program Files\Git\usr\bin;=% # Workaround for CMake not wanting sh.exe on PATH for MinGW
16 | - cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "%CMAKE_GENERATOR%" .
17 | build_script:
18 | - cmake --build . --config %CONFIGURATION%
19 | test_script:
20 | - ctest -C %CONFIGURATION% --output-on-failure .
21 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/keywords.txt:
--------------------------------------------------------------------------------
1 | # Macros
2 | JSON_ARRAY_SIZE KEYWORD2
3 | JSON_OBJECT_SIZE KEYWORD2
4 | JSON_STRING_SIZE KEYWORD2
5 |
6 | # Free functions
7 | deserializeJson KEYWORD2
8 | deserializeMsgPack KEYWORD2
9 | serialized KEYWORD2
10 | serializeJson KEYWORD2
11 | serializeJsonPretty KEYWORD2
12 | serializeMsgPack KEYWORD2
13 |
14 | # Methods
15 | add KEYWORD2
16 | as KEYWORD2
17 | createNestedArray KEYWORD2
18 | createNestedObject KEYWORD2
19 | get KEYWORD2
20 | set KEYWORD2
21 | to KEYWORD2
22 |
23 | # Type names
24 | DeserializationError KEYWORD1 DATA_TYPE
25 | DynamicJsonDocument KEYWORD1 DATA_TYPE
26 | JsonArray KEYWORD1 DATA_TYPE
27 | JsonArrayConst KEYWORD1 DATA_TYPE
28 | JsonFloat KEYWORD1 DATA_TYPE
29 | JsonInteger KEYWORD1 DATA_TYPE
30 | JsonObject KEYWORD1 DATA_TYPE
31 | JsonObjectConst KEYWORD1 DATA_TYPE
32 | JsonString KEYWORD1 DATA_TYPE
33 | JsonUInt KEYWORD1 DATA_TYPE
34 | JsonVariant KEYWORD1 DATA_TYPE
35 | JsonVariantConst KEYWORD1 DATA_TYPE
36 | StaticJsonDocument KEYWORD1 DATA_TYPE
37 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ArduinoJson",
3 | "keywords": "json, rest, http, web",
4 | "description": "An elegant and efficient JSON library for embedded systems",
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.11.0",
11 | "authors": {
12 | "name": "Benoit Blanchon",
13 | "url": "https://blog.benoitblanchon.fr"
14 | },
15 | "exclude": [
16 | "fuzzing",
17 | "scripts",
18 | "test",
19 | "third-party"
20 | ],
21 | "frameworks": "arduino",
22 | "platforms": "*"
23 | }
24 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/library.properties:
--------------------------------------------------------------------------------
1 | name=ArduinoJson
2 | version=6.11.0
3 | author=Benoit Blanchon
4 | maintainer=Benoit Blanchon
5 | sentence=An efficient and elegant JSON library for Arduino.
6 | paragraph=ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ MessagePack, ✔ fixed allocation, ✔ zero-copy, ✔ streams, 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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson.h:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Array/ArrayFunctions.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Collection/CollectionData.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | inline VariantData *arrayAdd(CollectionData *arr, MemoryPool *pool) {
12 | return arr ? arr->add(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) return true;
25 | if (!lhs || !rhs) return false;
26 |
27 | return lhs->equalsArray(*rhs);
28 | }
29 | } // namespace ARDUINOJSON_NAMESPACE
30 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Array/ArrayImpl.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Object/ObjectRef.hpp"
8 | #include "ArrayRef.hpp"
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 | } // namespace ARDUINOJSON_NAMESPACE
23 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Array/ArrayShortcuts.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/attributes.hpp"
8 | #include "../Polyfills/type_traits.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 | // Forward declarations.
12 | template
13 | class ElementProxy;
14 |
15 | template
16 | class ArrayShortcuts {
17 | public:
18 | // Returns the element at specified index if the variant is an array.
19 | FORCE_INLINE ElementProxy operator[](size_t index) const;
20 |
21 | FORCE_INLINE ObjectRef createNestedObject() const;
22 |
23 | FORCE_INLINE ArrayRef createNestedArray() const;
24 |
25 | // Adds the specified value at the end of the array.
26 | //
27 | // bool add(TValue);
28 | // TValue = bool, long, int, short, float, double, serialized, VariantRef,
29 | // std::string, String, ObjectRef
30 | template
31 | FORCE_INLINE bool add(const T &value) const {
32 | return impl()->addElement().set(value);
33 | }
34 | //
35 | // bool add(TValue);
36 | // TValue = char*, const char*, const __FlashStringHelper*
37 | template
38 | FORCE_INLINE bool add(T *value) const {
39 | return impl()->addElement().set(value);
40 | }
41 |
42 | private:
43 | const TArray *impl() const {
44 | return static_cast(this);
45 | }
46 | };
47 | } // namespace ARDUINOJSON_NAMESPACE
48 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Deserialization/ArduinoStreamReader.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #if ARDUINOJSON_ENABLE_ARDUINO_STREAM
8 |
9 | #include
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | struct ArduinoStreamReader {
14 | Stream& _stream;
15 |
16 | public:
17 | explicit ArduinoStreamReader(Stream& stream) : _stream(stream) {}
18 |
19 | int read() {
20 | // don't use _stream.read() as it ignores the timeout
21 | uint8_t c;
22 | return _stream.readBytes(&c, 1) ? c : -1;
23 | }
24 | };
25 |
26 | inline ArduinoStreamReader makeReader(Stream& input) {
27 | return ArduinoStreamReader(input);
28 | }
29 | } // namespace ARDUINOJSON_NAMESPACE
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Deserialization/FlashStringReader.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #if ARDUINOJSON_ENABLE_PROGMEM
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 | class UnsafeFlashStringReader {
11 | const char* _ptr;
12 |
13 | public:
14 | explicit UnsafeFlashStringReader(const __FlashStringHelper* ptr)
15 | : _ptr(reinterpret_cast(ptr)) {}
16 |
17 | int read() {
18 | return pgm_read_byte_near(_ptr++);
19 | }
20 | };
21 |
22 | class SafeFlashStringReader {
23 | const char* _ptr;
24 | const char* _end;
25 |
26 | public:
27 | explicit SafeFlashStringReader(const __FlashStringHelper* ptr, size_t size)
28 | : _ptr(reinterpret_cast(ptr)), _end(_ptr + size) {}
29 |
30 | int read() {
31 | if (_ptr < _end)
32 | return pgm_read_byte_near(_ptr++);
33 | else
34 | return -1;
35 | }
36 | };
37 |
38 | inline UnsafeFlashStringReader makeReader(const __FlashStringHelper* input) {
39 | return UnsafeFlashStringReader(input);
40 | }
41 |
42 | inline SafeFlashStringReader makeReader(const __FlashStringHelper* input,
43 | size_t size) {
44 | return SafeFlashStringReader(input, size);
45 | }
46 | } // namespace ARDUINOJSON_NAMESPACE
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Deserialization/IteratorReader.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | template
10 | class IteratorReader {
11 | TIterator _ptr, _end;
12 |
13 | public:
14 | explicit IteratorReader(TIterator begin, TIterator end)
15 | : _ptr(begin), _end(end) {}
16 |
17 | int read() {
18 | if (_ptr < _end)
19 | return static_cast(*_ptr++);
20 | else
21 | return -1;
22 | }
23 | };
24 |
25 | template
26 | inline IteratorReader makeReader(
27 | const TInput& input) {
28 | return IteratorReader(input.begin(),
29 | input.end());
30 | }
31 | } // namespace ARDUINOJSON_NAMESPACE
32 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Deserialization/NestingLimit.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Configuration.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | struct NestingLimit {
12 | NestingLimit() : value(ARDUINOJSON_DEFAULT_NESTING_LIMIT) {}
13 | explicit NestingLimit(uint8_t n) : value(n) {}
14 |
15 | uint8_t value;
16 | };
17 | } // namespace ARDUINOJSON_NAMESPACE
18 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Deserialization/StdStreamReader.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #if ARDUINOJSON_ENABLE_STD_STREAM
8 |
9 | #include
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | class StdStreamReader {
14 | std::istream& _stream;
15 | char _current;
16 |
17 | public:
18 | explicit StdStreamReader(std::istream& stream)
19 | : _stream(stream), _current(0) {}
20 |
21 | int read() {
22 | return _stream.get();
23 | }
24 |
25 | private:
26 | StdStreamReader& operator=(const StdStreamReader&); // Visual Studio C4512
27 | };
28 |
29 | inline StdStreamReader makeReader(std::istream& input) {
30 | return StdStreamReader(input);
31 | }
32 | } // namespace ARDUINOJSON_NAMESPACE
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Document/DynamicJsonDocument.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "BasicJsonDocument.hpp"
8 |
9 | #include // malloc, free
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | struct DefaultAllocator {
14 | void* allocate(size_t n) {
15 | return malloc(n);
16 | }
17 |
18 | void deallocate(void* p) {
19 | free(p);
20 | }
21 | };
22 |
23 | typedef BasicJsonDocument DynamicJsonDocument;
24 |
25 | } // namespace ARDUINOJSON_NAMESPACE
26 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Document/StaticJsonDocument.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "JsonDocument.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | template
12 | class StaticJsonDocument : public JsonDocument {
13 | static const size_t _capacity =
14 | AddPadding::value>::value;
15 |
16 | public:
17 | StaticJsonDocument() : JsonDocument(_buffer, _capacity) {}
18 |
19 | StaticJsonDocument(const StaticJsonDocument& src)
20 | : JsonDocument(_buffer, _capacity) {
21 | set(src);
22 | }
23 |
24 | template
25 | StaticJsonDocument(const T& src,
26 | typename enable_if::value>::type* = 0)
27 | : JsonDocument(_buffer, _capacity) {
28 | set(src);
29 | }
30 |
31 | // disambiguate
32 | StaticJsonDocument(VariantRef src) : JsonDocument(_buffer, _capacity) {
33 | set(src);
34 | }
35 |
36 | StaticJsonDocument operator=(const StaticJsonDocument& src) {
37 | set(src);
38 | return *this;
39 | }
40 |
41 | template
42 | StaticJsonDocument operator=(const T& src) {
43 | set(src);
44 | return *this;
45 | }
46 |
47 | private:
48 | char _buffer[_capacity];
49 | };
50 |
51 | } // namespace ARDUINOJSON_NAMESPACE
52 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Json/EscapeSequence.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | class EscapeSequence {
10 | public:
11 | // Optimized for code size on a 8-bit AVR
12 | static char escapeChar(char c) {
13 | const char *p = escapeTable(false);
14 | while (p[0] && p[1] != c) {
15 | p += 2;
16 | }
17 | return p[0];
18 | }
19 |
20 | // Optimized for code size on a 8-bit AVR
21 | static char unescapeChar(char c) {
22 | const char *p = escapeTable(true);
23 | for (;;) {
24 | if (p[0] == '\0') return c;
25 | if (p[0] == c) return p[1];
26 | p += 2;
27 | }
28 | }
29 |
30 | private:
31 | static const char *escapeTable(bool excludeIdenticals) {
32 | return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0];
33 | }
34 | };
35 | } // namespace ARDUINOJSON_NAMESPACE
36 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Json/Utf8.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | namespace Utf8 {
10 | template
11 | inline void encodeCodepoint(uint16_t codepoint, TStringBuilder &str) {
12 | if (codepoint < 0x80) {
13 | str.append(char(codepoint));
14 | return;
15 | }
16 |
17 | if (codepoint >= 0x00000800) {
18 | str.append(char(0xe0 /*0b11100000*/ | (codepoint >> 12)));
19 | str.append(char(((codepoint >> 6) & 0x3f /*0b00111111*/) | 0x80));
20 | } else {
21 | str.append(char(0xc0 /*0b11000000*/ | (codepoint >> 6)));
22 | }
23 | str.append(char((codepoint & 0x3f /*0b00111111*/) | 0x80));
24 | }
25 | } // namespace Utf8
26 | } // namespace ARDUINOJSON_NAMESPACE
27 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Memory/Alignment.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // size_t
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | inline bool isAligned(void *ptr) {
12 | const size_t mask = sizeof(void *) - 1;
13 | size_t addr = reinterpret_cast(ptr);
14 | return (addr & mask) == 0;
15 | }
16 |
17 | inline size_t addPadding(size_t bytes) {
18 | const size_t mask = sizeof(void *) - 1;
19 | return (bytes + mask) & ~mask;
20 | }
21 |
22 | template
23 | struct AddPadding {
24 | static const size_t mask = sizeof(void *) - 1;
25 | static const size_t value = (bytes + mask) & ~mask;
26 | };
27 |
28 | } // namespace ARDUINOJSON_NAMESPACE
29 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Memory/StringBuilder.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "MemoryPool.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | class StringBuilder {
12 | public:
13 | explicit StringBuilder(MemoryPool* parent) : _parent(parent), _size(0) {
14 | _slot = _parent->allocExpandableString();
15 | }
16 |
17 | void append(const char* s) {
18 | while (*s) append(*s++);
19 | }
20 |
21 | void append(const char* s, size_t n) {
22 | while (n-- > 0) append(*s++);
23 | }
24 |
25 | void append(char c) {
26 | if (!_slot.value) return;
27 |
28 | if (_size >= _slot.size) {
29 | _slot.value = 0;
30 | return;
31 | }
32 |
33 | _slot.value[_size++] = c;
34 | }
35 |
36 | char* complete() {
37 | append('\0');
38 | if (_slot.value) {
39 | _parent->freezeString(_slot, _size);
40 | }
41 | return _slot.value;
42 | }
43 |
44 | private:
45 | MemoryPool* _parent;
46 | size_t _size;
47 | StringSlot _slot;
48 | };
49 |
50 | } // namespace ARDUINOJSON_NAMESPACE
51 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Memory/StringSlot.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // for size_t
8 | #include "../Configuration.hpp"
9 |
10 | #define JSON_STRING_SIZE(SIZE) (SIZE)
11 |
12 | namespace ARDUINOJSON_NAMESPACE {
13 |
14 | struct StringSlot {
15 | char *value;
16 | size_t size;
17 | };
18 | } // namespace ARDUINOJSON_NAMESPACE
19 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Misc/Visitable.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/type_traits.hpp"
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/MsgPack/endianess.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/type_traits.hpp"
8 | #include "../Polyfills/utility.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 |
12 | #if ARDUINOJSON_LITTLE_ENDIAN
13 | inline void fixEndianess(uint8_t *p, integral_constant) {
14 | swap(p[0], p[7]);
15 | swap(p[1], p[6]);
16 | swap(p[2], p[5]);
17 | swap(p[3], p[4]);
18 | }
19 |
20 | inline void fixEndianess(uint8_t *p, integral_constant) {
21 | swap(p[0], p[3]);
22 | swap(p[1], p[2]);
23 | }
24 |
25 | inline void fixEndianess(uint8_t *p, integral_constant) {
26 | swap(p[0], p[1]);
27 | }
28 |
29 | inline void fixEndianess(uint8_t *, integral_constant) {}
30 |
31 | template
32 | inline void fixEndianess(T &value) {
33 | fixEndianess(reinterpret_cast(&value),
34 | integral_constant());
35 | }
36 | #else
37 | template
38 | inline void fixEndianess(T &) {}
39 | #endif
40 |
41 | } // namespace ARDUINOJSON_NAMESPACE
42 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/MsgPack/ieee754.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | inline void doubleToFloat(const uint8_t d[8], uint8_t f[4]) {
10 | f[0] = uint8_t((d[0] & 0xC0) | (d[0] << 3 & 0x3f) | (d[1] >> 5));
11 | f[1] = uint8_t((d[1] << 3) | (d[2] >> 5));
12 | f[2] = uint8_t((d[2] << 3) | (d[3] >> 5));
13 | f[3] = uint8_t((d[3] << 3) | (d[4] >> 5));
14 | }
15 |
16 | } // namespace ARDUINOJSON_NAMESPACE
17 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Namespace.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "version.hpp"
8 |
9 | #include "Configuration.hpp"
10 |
11 | #define ARDUINOJSON_DO_CONCAT(A, B) A##B
12 | #define ARDUINOJSON_CONCAT2(A, B) ARDUINOJSON_DO_CONCAT(A, B)
13 | #define ARDUINOJSON_CONCAT3(A, B, C) \
14 | ARDUINOJSON_CONCAT2(A, ARDUINOJSON_CONCAT2(B, C))
15 | #define ARDUINOJSON_CONCAT4(A, B, C, D) \
16 | ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT2(A, B), ARDUINOJSON_CONCAT2(C, D))
17 | #define ARDUINOJSON_CONCAT8(A, B, C, D, E, F, G, H) \
18 | ARDUINOJSON_CONCAT2(ARDUINOJSON_CONCAT4(A, B, C, D), \
19 | ARDUINOJSON_CONCAT4(E, F, G, H))
20 | #define ARDUINOJSON_CONCAT10(A, B, C, D, E, F, G, H, I, J) \
21 | ARDUINOJSON_CONCAT8(A, B, C, D, E, F, G, ARDUINOJSON_CONCAT3(H, I, J))
22 |
23 | #define ARDUINOJSON_NAMESPACE \
24 | ARDUINOJSON_CONCAT10( \
25 | ArduinoJson, ARDUINOJSON_VERSION_MAJOR, ARDUINOJSON_VERSION_MINOR, \
26 | ARDUINOJSON_VERSION_REVISION, _, ARDUINOJSON_USE_LONG_LONG, \
27 | ARDUINOJSON_USE_DOUBLE, ARDUINOJSON_DECODE_UNICODE, \
28 | ARDUINOJSON_ENABLE_NAN, ARDUINOJSON_ENABLE_INFINITY)
29 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Numbers/Float.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Configuration.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | #if ARDUINOJSON_USE_DOUBLE
12 | typedef double Float;
13 | #else
14 | typedef float Float;
15 | #endif
16 | } // namespace ARDUINOJSON_NAMESPACE
17 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Numbers/Integer.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Configuration.hpp"
8 |
9 | #include // int64_t
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | #if ARDUINOJSON_USE_LONG_LONG
14 | typedef int64_t Integer;
15 | typedef uint64_t UInt;
16 | #else
17 | typedef long Integer;
18 | typedef unsigned long UInt;
19 | #endif
20 | } // namespace ARDUINOJSON_NAMESPACE
21 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Numbers/parseFloat.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "convertNumber.hpp"
8 | #include "parseNumber.hpp"
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Numbers/parseInteger.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/type_traits.hpp"
8 | #include "convertNumber.hpp"
9 | #include "parseNumber.hpp"
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Object/ObjectFunctions.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Collection/CollectionData.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | template
12 | void objectAccept(const CollectionData *obj, Visitor &visitor) {
13 | if (obj)
14 | visitor.visitObject(*obj);
15 | else
16 | visitor.visitNull();
17 | }
18 |
19 | inline bool objectEquals(const CollectionData *lhs, const CollectionData *rhs) {
20 | if (lhs == rhs) return true;
21 | if (!lhs || !rhs) return false;
22 | return lhs->equalsObject(*rhs);
23 | }
24 |
25 | template
26 | inline VariantData *objectGet(const CollectionData *obj, TAdaptedString key) {
27 | if (!obj) return 0;
28 | return obj->get(key);
29 | }
30 |
31 | template
32 | void objectRemove(CollectionData *obj, TAdaptedString key) {
33 | if (!obj) return;
34 | obj->remove(key);
35 | }
36 |
37 | template
38 | inline VariantData *objectGetOrCreate(CollectionData *obj, TAdaptedString key,
39 | MemoryPool *pool) {
40 | if (!obj) return 0;
41 |
42 | // ignore null key
43 | if (key.isNull()) return 0;
44 |
45 | // search a matching key
46 | VariantData *var = obj->get(key);
47 | if (var) return var;
48 |
49 | return obj->add(key, pool);
50 | }
51 | } // namespace ARDUINOJSON_NAMESPACE
52 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Object/Pair.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Strings/String.hpp"
8 | #include "../Variant/VariantRef.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 | // A key value pair for CollectionData.
12 | class Pair {
13 | public:
14 | Pair(MemoryPool* pool, VariantSlot* slot) {
15 | if (slot) {
16 | _key = String(slot->key(), !slot->ownsKey());
17 | _value = VariantRef(pool, slot->data());
18 | }
19 | }
20 |
21 | String key() const {
22 | return _key;
23 | }
24 |
25 | VariantRef value() const {
26 | return _value;
27 | }
28 |
29 | private:
30 | String _key;
31 | VariantRef _value;
32 | };
33 |
34 | class PairConst {
35 | public:
36 | PairConst(const VariantSlot* slot) {
37 | if (slot) {
38 | _key = String(slot->key(), !slot->ownsKey());
39 | _value = VariantConstRef(slot->data());
40 | }
41 | }
42 |
43 | String key() const {
44 | return _key;
45 | }
46 |
47 | VariantConstRef value() const {
48 | return _value;
49 | }
50 |
51 | private:
52 | String _key;
53 | VariantConstRef _value;
54 | };
55 | } // namespace ARDUINOJSON_NAMESPACE
56 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Operators/VariantCasts.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/attributes.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | template
12 | class VariantCasts {
13 | public:
14 | template
15 | FORCE_INLINE operator T() const {
16 | return impl()->template as();
17 | }
18 |
19 | private:
20 | const TImpl *impl() const {
21 | return static_cast(this);
22 | }
23 | };
24 | } // namespace ARDUINOJSON_NAMESPACE
25 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Operators/VariantOperators.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "VariantCasts.hpp"
8 | #include "VariantComparisons.hpp"
9 | #include "VariantOr.hpp"
10 | #include "VariantShortcuts.hpp"
11 |
12 | namespace ARDUINOJSON_NAMESPACE {
13 |
14 | template
15 | class VariantOperators : public VariantCasts,
16 | public VariantComparisons,
17 | public VariantOr,
18 | public VariantShortcuts {};
19 | } // namespace ARDUINOJSON_NAMESPACE
20 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Operators/VariantOr.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/attributes.hpp"
8 | #include "../Polyfills/type_traits.hpp"
9 | #include "../Variant/VariantAs.hpp"
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | template
14 | class VariantOr {
15 | public:
16 | // Returns the default value if the VariantRef is undefined of incompatible
17 | template
18 | T operator|(const T &defaultValue) const {
19 | if (impl()->template is())
20 | return impl()->template as();
21 | else
22 | return defaultValue;
23 | }
24 |
25 | // Returns the default value if the VariantRef is undefined of incompatible
26 | // Special case for string: null is treated as undefined
27 | const char *operator|(const char *defaultValue) const {
28 | const char *value = impl()->template as();
29 | return value ? value : defaultValue;
30 | }
31 |
32 | private:
33 | const TImpl *impl() const {
34 | return static_cast(this);
35 | }
36 | };
37 | } // namespace ARDUINOJSON_NAMESPACE
38 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Operators/VariantShortcuts.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Array/ArrayShortcuts.hpp"
8 | #include "../Object/ObjectShortcuts.hpp"
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/alias_cast.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include
8 | #include // for size_t
9 | #include "../Configuration.hpp"
10 | #include "../Polyfills/math.hpp"
11 |
12 | namespace ARDUINOJSON_NAMESPACE {
13 |
14 | template
15 | struct alias_cast_t {
16 | union {
17 | F raw;
18 | T data;
19 | };
20 | };
21 |
22 | template
23 | T alias_cast(F raw_data) {
24 | alias_cast_t ac;
25 | ac.raw = raw_data;
26 | return ac.data;
27 | }
28 | } // namespace ARDUINOJSON_NAMESPACE
29 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/assert.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #ifdef ARDUINOJSON_DEBUG
8 | #include
9 | #define ARDUINOJSON_ASSERT(X) assert(X)
10 | #else
11 | #define ARDUINOJSON_ASSERT(X) ((void)0)
12 | #endif
13 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/attributes.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #ifdef _MSC_VER // Visual Studio
8 |
9 | #define FORCE_INLINE // __forceinline causes C4714 when returning std::string
10 | #define NO_INLINE __declspec(noinline)
11 | #define DEPRECATED(msg) __declspec(deprecated(msg))
12 |
13 | #elif defined(__GNUC__) // GCC or Clang
14 |
15 | #define FORCE_INLINE __attribute__((always_inline))
16 | #define NO_INLINE __attribute__((noinline))
17 | #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
18 | #define DEPRECATED(msg) __attribute__((deprecated(msg)))
19 | #else
20 | #define DEPRECATED(msg) __attribute__((deprecated))
21 | #endif
22 |
23 | #else // Other compilers
24 |
25 | #define FORCE_INLINE
26 | #define NO_INLINE
27 | #define DEPRECATED(msg)
28 |
29 | #endif
30 |
31 | #if __cplusplus >= 201103L
32 | #define NOEXCEPT noexcept
33 | #else
34 | #define NOEXCEPT throw()
35 | #endif
36 |
37 | #if defined(__has_attribute)
38 | #if __has_attribute(no_sanitize)
39 | #define ARDUINOJSON_NO_SANITIZE(check) __attribute__((no_sanitize(check)))
40 | #else
41 | #define ARDUINOJSON_NO_SANITIZE(check)
42 | #endif
43 | #else
44 | #define ARDUINOJSON_NO_SANITIZE(check)
45 | #endif
46 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/ctype.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | inline bool isdigit(char c) {
10 | return '0' <= c && c <= '9';
11 | }
12 |
13 | inline bool issign(char c) {
14 | return '-' == c || c == '+';
15 | }
16 | } // namespace ARDUINOJSON_NAMESPACE
17 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/gsl/not_null.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../assert.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | template
12 | class not_null {
13 | public:
14 | explicit not_null(T ptr) : _ptr(ptr) {
15 | ARDUINOJSON_ASSERT(ptr != NULL);
16 | }
17 |
18 | T get() const {
19 | ARDUINOJSON_ASSERT(_ptr != NULL);
20 | return _ptr;
21 | }
22 |
23 | private:
24 | T _ptr;
25 | };
26 |
27 | template
28 | not_null make_not_null(T ptr) {
29 | ARDUINOJSON_ASSERT(ptr != NULL);
30 | return not_null(ptr);
31 | }
32 |
33 | } // namespace ARDUINOJSON_NAMESPACE
34 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/limits.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Polyfills/type_traits.hpp"
8 |
9 | #ifdef _MSC_VER
10 | #pragma warning(push)
11 | #pragma warning(disable : 4310)
12 | #endif
13 |
14 | namespace ARDUINOJSON_NAMESPACE {
15 |
16 | // Differs from standard because we can't use the symbols "min" and "max"
17 | template
18 | struct numeric_limits;
19 |
20 | template
21 | struct numeric_limits::value>::type> {
22 | static T lowest() {
23 | return 0;
24 | }
25 | static T highest() {
26 | return T(-1);
27 | }
28 | };
29 |
30 | template
31 | struct numeric_limits<
32 | T, typename enable_if::value && is_signed::value>::type> {
33 | static T lowest() {
34 | return T(T(1) << (sizeof(T) * 8 - 1));
35 | }
36 | static T highest() {
37 | return T(~lowest());
38 | }
39 | };
40 |
41 | } // namespace ARDUINOJSON_NAMESPACE
42 |
43 | #ifdef _MSC_VER
44 | #pragma warning(pop)
45 | #endif
46 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/math.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | // Some libraries #define isnan() and isinf() so we need to check before
10 | // using this name
11 |
12 | #ifndef isnan
13 | template
14 | bool isnan(T x) {
15 | return x != x;
16 | }
17 | #endif
18 |
19 | #ifndef isinf
20 | template
21 | bool isinf(T x) {
22 | return x != 0.0 && x * 2 == x;
23 | }
24 | #endif
25 | } // namespace ARDUINOJSON_NAMESPACE
26 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/mpl/max.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // for size_t
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | // A meta-function that returns the highest value
12 | template Y)>
13 | struct Max {};
14 |
15 | template
16 | struct Max {
17 | static const size_t value = X;
18 | };
19 |
20 | template
21 | struct Max {
22 | static const size_t value = Y;
23 | };
24 | } // namespace ARDUINOJSON_NAMESPACE
25 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/safe_strcmp.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | inline int8_t safe_strcmp(const char* a, const char* b) {
10 | if (a == b) return 0;
11 | if (!a) return -1;
12 | if (!b) return 1;
13 | return static_cast(strcmp(a, b));
14 | }
15 |
16 | inline int8_t safe_strncmp(const char* a, const char* b, size_t n) {
17 | if (a == b) return 0;
18 | if (!a) return -1;
19 | if (!b) return 1;
20 | return static_cast(strncmp(a, b, n));
21 | }
22 | } // namespace ARDUINOJSON_NAMESPACE
23 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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_const.hpp"
13 | #include "type_traits/is_floating_point.hpp"
14 | #include "type_traits/is_integral.hpp"
15 | #include "type_traits/is_same.hpp"
16 | #include "type_traits/is_signed.hpp"
17 | #include "type_traits/is_unsigned.hpp"
18 | #include "type_traits/make_unsigned.hpp"
19 | #include "type_traits/remove_const.hpp"
20 | #include "type_traits/remove_reference.hpp"
21 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/conditional.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | template
10 | struct conditional {
11 | typedef TrueType type;
12 | };
13 |
14 | template
15 | struct conditional {
16 | typedef FalseType type;
17 | };
18 | } // namespace ARDUINOJSON_NAMESPACE
19 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/enable_if.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | // A meta-function that return the type T if Condition is true.
10 | template
11 | struct enable_if {};
12 |
13 | template
14 | struct enable_if {
15 | typedef T type;
16 | };
17 | } // namespace ARDUINOJSON_NAMESPACE
18 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/integral_constant.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | template
10 | struct integral_constant {
11 | static const T value = v;
12 | };
13 |
14 | typedef integral_constant true_type;
15 | typedef integral_constant false_type;
16 |
17 | } // namespace ARDUINOJSON_NAMESPACE
18 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_array.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // size_t
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | template
12 | struct is_array : false_type {};
13 |
14 | template
15 | struct is_array : true_type {};
16 |
17 | template
18 | struct is_array : true_type {};
19 | } // namespace ARDUINOJSON_NAMESPACE
20 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_base_of.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | // A meta-function that returns true if Derived inherits from TBase is an
10 | // integral type.
11 | template
12 | class is_base_of {
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 | static Yes &probe(const TBase *);
18 | static No &probe(...);
19 |
20 | public:
21 | static const bool value =
22 | sizeof(probe(reinterpret_cast(0))) == sizeof(Yes);
23 | };
24 | } // namespace ARDUINOJSON_NAMESPACE
25 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_const.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_floating_point.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_integral.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../../Configuration.hpp"
8 | #include "is_same.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 |
12 | // A meta-function that returns true if T is an integral type.
13 | template
14 | struct is_integral {
15 | static const bool value =
16 | is_same::value || is_same::value ||
17 | is_same::value || is_same::value ||
18 | is_same::value || is_same::value ||
19 | is_same::value || is_same::value ||
20 | #if ARDUINOJSON_HAS_LONG_LONG
21 | is_same::value ||
22 | is_same::value ||
23 | #endif
24 | #if ARDUINOJSON_HAS_INT64
25 | is_same::value ||
26 | is_same::value ||
27 | #endif
28 | is_same::value;
29 |
30 | // CAUTION: differs from std::is_integral as it doesn't include bool
31 | };
32 |
33 | template
34 | struct is_integral : is_integral {};
35 | } // namespace ARDUINOJSON_NAMESPACE
36 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_same.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_signed.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "integral_constant.hpp"
8 | namespace ARDUINOJSON_NAMESPACE {
9 |
10 | template
11 | struct is_signed : false_type {};
12 |
13 | template <>
14 | struct is_signed : true_type {};
15 |
16 | template <>
17 | struct is_signed : true_type {};
18 |
19 | template <>
20 | struct is_signed : true_type {};
21 |
22 | template <>
23 | struct is_signed : true_type {};
24 |
25 | template <>
26 | struct is_signed : true_type {};
27 |
28 | template <>
29 | struct is_signed : true_type {};
30 |
31 | template <>
32 | struct is_signed : true_type {};
33 |
34 | #if ARDUINOJSON_HAS_LONG_LONG
35 | template <>
36 | struct is_signed : true_type {};
37 | #endif
38 |
39 | #if ARDUINOJSON_HAS_INT64
40 | template <>
41 | struct is_signed : true_type {};
42 | #endif
43 | } // namespace ARDUINOJSON_NAMESPACE
44 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/is_unsigned.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/remove_const.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | // A meta-function that return the type T without the const modifier
10 | template
11 | struct remove_const {
12 | typedef T type;
13 | };
14 | template
15 | struct remove_const {
16 | typedef T type;
17 | };
18 | } // namespace ARDUINOJSON_NAMESPACE
19 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/remove_reference.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | // A meta-function that return the type T without the reference modifier.
10 | template
11 | struct remove_reference {
12 | typedef T type;
13 | };
14 | template
15 | struct remove_reference {
16 | typedef T type;
17 | };
18 | } // namespace ARDUINOJSON_NAMESPACE
19 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/type_traits/type_identity.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
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 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Polyfills/utility.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 | template
9 | inline void swap(T& a, T& b) {
10 | T t(a);
11 | a = b;
12 | b = t;
13 | }
14 | } // namespace ARDUINOJSON_NAMESPACE
15 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Serialization/DummyWriter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | class DummyWriter {
10 | public:
11 | size_t write(uint8_t) {
12 | return 1;
13 | }
14 |
15 | size_t write(const uint8_t*, size_t n) {
16 | return n;
17 | }
18 | };
19 | } // namespace ARDUINOJSON_NAMESPACE
20 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Serialization/StaticStringWriter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | // A Print implementation that allows to write in a char[]
10 | class StaticStringWriter {
11 | public:
12 | StaticStringWriter(char *buf, size_t size) : end(buf + size - 1), p(buf) {
13 | *p = '\0';
14 | }
15 |
16 | size_t write(uint8_t c) {
17 | if (p >= end) return 0;
18 | *p++ = static_cast(c);
19 | *p = '\0';
20 | return 1;
21 | }
22 |
23 | size_t write(const uint8_t *s, size_t n) {
24 | char *begin = p;
25 | while (p < end && n > 0) {
26 | *p++ = static_cast(*s++);
27 | n--;
28 | }
29 | *p = '\0';
30 | return size_t(p - begin);
31 | }
32 |
33 | private:
34 | char *end;
35 | char *p;
36 | };
37 | } // namespace ARDUINOJSON_NAMESPACE
38 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Serialization/StreamWriter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Configuration.hpp"
8 |
9 | #if ARDUINOJSON_ENABLE_STD_STREAM
10 |
11 | #include
12 |
13 | namespace ARDUINOJSON_NAMESPACE {
14 |
15 | class StreamWriter {
16 | public:
17 | explicit StreamWriter(std::ostream& os) : _os(os) {}
18 |
19 | size_t write(uint8_t c) {
20 | _os << c;
21 | return 1;
22 | }
23 |
24 | size_t write(const uint8_t* s, size_t n) {
25 | _os.write(reinterpret_cast(s),
26 | static_cast(n));
27 | return n;
28 | }
29 |
30 | private:
31 | // cannot be assigned
32 | StreamWriter& operator=(const StreamWriter&);
33 |
34 | std::ostream& _os;
35 | };
36 | } // namespace ARDUINOJSON_NAMESPACE
37 |
38 | #endif // ARDUINOJSON_ENABLE_STD_STREAM
39 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Serialization/measure.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "./DummyWriter.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | template class TSerializer, typename TSource>
12 | size_t measure(const TSource &source) {
13 | DummyWriter dp;
14 | TSerializer serializer(dp);
15 | source.accept(serializer);
16 | return serializer.bytesWritten();
17 | }
18 |
19 | } // namespace ARDUINOJSON_NAMESPACE
20 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/StringStorage/StringCopier.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Memory/MemoryPool.hpp"
8 | #include "../Memory/StringBuilder.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 |
12 | class StringCopier {
13 | public:
14 | typedef ARDUINOJSON_NAMESPACE::StringBuilder StringBuilder;
15 |
16 | StringCopier(MemoryPool* pool) : _pool(pool) {}
17 |
18 | StringBuilder startString() {
19 | return StringBuilder(_pool);
20 | }
21 |
22 | private:
23 | MemoryPool* _pool;
24 | };
25 | } // namespace ARDUINOJSON_NAMESPACE
26 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/StringStorage/StringMover.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | class StringMover {
10 | public:
11 | class StringBuilder {
12 | public:
13 | StringBuilder(char** ptr) : _writePtr(ptr), _startPtr(*ptr) {}
14 |
15 | void append(char c) {
16 | *(*_writePtr)++ = char(c);
17 | }
18 |
19 | char* complete() const {
20 | *(*_writePtr)++ = 0;
21 | return _startPtr;
22 | }
23 |
24 | private:
25 | char** _writePtr;
26 | char* _startPtr;
27 | };
28 |
29 | StringMover(char* ptr) : _ptr(ptr) {}
30 |
31 | StringBuilder startString() {
32 | return StringBuilder(&_ptr);
33 | }
34 |
35 | private:
36 | char* _ptr;
37 | };
38 | } // namespace ARDUINOJSON_NAMESPACE
39 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/StringStorage/StringStorage.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "./StringCopier.hpp"
8 | #include "./StringMover.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 |
12 | template
13 | struct StringStorage {
14 | typedef StringCopier type;
15 |
16 | static type create(MemoryPool& pool, TInput&) {
17 | return type(&pool);
18 | }
19 | };
20 |
21 | template
22 | struct StringStorage::value>::type> {
24 | typedef StringMover type;
25 |
26 | static type create(MemoryPool&, TChar* input) {
27 | return type(reinterpret_cast(input));
28 | }
29 | };
30 |
31 | template
32 | typename StringStorage::type makeStringStorage(MemoryPool& pool,
33 | TInput& input) {
34 | return StringStorage::create(pool, input);
35 | }
36 |
37 | template
38 | typename StringStorage::type makeStringStorage(MemoryPool& pool,
39 | TChar* input) {
40 | return StringStorage::create(pool, input);
41 | }
42 | } // namespace ARDUINOJSON_NAMESPACE
43 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Strings/ConstRamStringAdapter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // size_t
8 | #include // strcmp
9 | #include "../Polyfills/safe_strcmp.hpp"
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | class ConstRamStringAdapter {
14 | public:
15 | ConstRamStringAdapter(const char* str = 0) : _str(str) {}
16 |
17 | int8_t compare(const char* other) const {
18 | return safe_strcmp(_str, other);
19 | }
20 |
21 | bool equals(const char* expected) const {
22 | return compare(expected) == 0;
23 | }
24 |
25 | bool isNull() const {
26 | return !_str;
27 | }
28 |
29 | template
30 | char* save(TMemoryPool*) const {
31 | return 0;
32 | }
33 |
34 | size_t size() const {
35 | if (!_str) return 0;
36 | return strlen(_str);
37 | }
38 |
39 | const char* data() const {
40 | return _str;
41 | }
42 |
43 | bool isStatic() const {
44 | return true;
45 | }
46 |
47 | protected:
48 | const char* _str;
49 | };
50 |
51 | inline ConstRamStringAdapter adaptString(const char* str) {
52 | return ConstRamStringAdapter(str);
53 | }
54 |
55 | } // namespace ARDUINOJSON_NAMESPACE
56 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Strings/RamStringAdapter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "ConstRamStringAdapter.hpp"
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | class RamStringAdapter : public ConstRamStringAdapter {
12 | public:
13 | RamStringAdapter(const char* str) : ConstRamStringAdapter(str) {}
14 |
15 | char* save(MemoryPool* pool) const {
16 | if (!_str) return NULL;
17 | size_t n = size() + 1;
18 | char* dup = pool->allocFrozenString(n);
19 | if (dup) memcpy(dup, _str, n);
20 | return dup;
21 | }
22 |
23 | bool isStatic() const {
24 | return false;
25 | }
26 | };
27 |
28 | template
29 | inline RamStringAdapter adaptString(const TChar* str) {
30 | return RamStringAdapter(reinterpret_cast(str));
31 | }
32 |
33 | inline RamStringAdapter adaptString(char* str) {
34 | return RamStringAdapter(str);
35 | }
36 |
37 | template
38 | struct IsString {
39 | static const bool value = sizeof(TChar) == 1;
40 | };
41 |
42 | template <>
43 | struct IsString {
44 | static const bool value = false;
45 | };
46 |
47 | } // namespace ARDUINOJSON_NAMESPACE
48 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Strings/SizedFlashStringAdapter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 |
9 | class SizedFlashStringAdapter {
10 | public:
11 | SizedFlashStringAdapter(const __FlashStringHelper* str, size_t sz)
12 | : _str(str), _size(sz) {}
13 |
14 | int8_t compare(const char* other) const {
15 | if (!other && !_str) return 0;
16 | if (!_str) return -1;
17 | if (!other) return 1;
18 | return -strncmp_P(other, reinterpret_cast(_str), _size);
19 | }
20 |
21 | bool equals(const char* expected) const {
22 | return compare(expected) == 0;
23 | }
24 |
25 | bool isNull() const {
26 | return !_str;
27 | }
28 |
29 | char* save(MemoryPool* pool) const {
30 | if (!_str) return NULL;
31 | char* dup = pool->allocFrozenString(_size);
32 | if (!dup) memcpy_P(dup, (const char*)_str, _size);
33 | return dup;
34 | }
35 |
36 | size_t size() const {
37 | return _size;
38 | }
39 |
40 | bool isStatic() const {
41 | return false;
42 | }
43 |
44 | private:
45 | const __FlashStringHelper* _str;
46 | size_t _size;
47 | };
48 |
49 | inline SizedFlashStringAdapter adaptString(const __FlashStringHelper* str,
50 | size_t sz) {
51 | return SizedFlashStringAdapter(str, sz);
52 | }
53 | } // namespace ARDUINOJSON_NAMESPACE
54 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Strings/SizedRamStringAdapter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // strcmp
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | class SizedRamStringAdapter {
12 | public:
13 | SizedRamStringAdapter(const char* str, size_t n) : _str(str), _size(n) {}
14 |
15 | int8_t compare(const char* other) const {
16 | return safe_strncmp(_str, other, _size) == 0;
17 | }
18 |
19 | bool equals(const char* expected) const {
20 | return compare(expected) == 0;
21 | }
22 |
23 | bool isNull() const {
24 | return !_str;
25 | }
26 |
27 | char* save(MemoryPool* pool) const {
28 | if (!_str) return NULL;
29 | char* dup = pool->allocFrozenString(_size);
30 | if (dup) memcpy(dup, _str, _size);
31 | return dup;
32 | }
33 |
34 | size_t size() const {
35 | return _size;
36 | }
37 |
38 | bool isStatic() const {
39 | return false;
40 | }
41 |
42 | private:
43 | const char* _str;
44 | size_t _size;
45 | };
46 |
47 | template
48 | inline SizedRamStringAdapter adaptString(const TChar* str, size_t size) {
49 | return SizedRamStringAdapter(reinterpret_cast(str), size);
50 | }
51 |
52 | } // namespace ARDUINOJSON_NAMESPACE
53 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Strings/StlStringAdapter.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include
8 |
9 | namespace ARDUINOJSON_NAMESPACE {
10 |
11 | class StlStringAdapter {
12 | public:
13 | StlStringAdapter(const std::string& str) : _str(&str) {}
14 |
15 | char* save(MemoryPool* pool) const {
16 | size_t n = _str->length() + 1;
17 | char* dup = pool->allocFrozenString(n);
18 | if (dup) memcpy(dup, _str->c_str(), n);
19 | return dup;
20 | }
21 |
22 | bool isNull() const {
23 | return false;
24 | }
25 |
26 | int8_t compare(const char* other) const {
27 | if (!other) return 1;
28 | return static_cast(_str->compare(other));
29 | }
30 |
31 | bool equals(const char* expected) const {
32 | if (!expected) return false;
33 | return *_str == expected;
34 | }
35 |
36 | const char* data() const {
37 | return _str->data();
38 | }
39 |
40 | size_t size() const {
41 | return _str->size();
42 | }
43 |
44 | bool isStatic() const {
45 | return false;
46 | }
47 |
48 | private:
49 | const std::string* _str;
50 | };
51 |
52 | template <>
53 | struct IsString : true_type {};
54 |
55 | inline StlStringAdapter adaptString(const std::string& str) {
56 | return StlStringAdapter(str);
57 | }
58 |
59 | } // namespace ARDUINOJSON_NAMESPACE
60 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Strings/StringAdapters.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Memory/MemoryPool.hpp"
8 | #include "../Polyfills/type_traits.hpp"
9 |
10 | namespace ARDUINOJSON_NAMESPACE {
11 | template
12 | struct IsString : false_type {};
13 |
14 | template
15 | struct IsString : IsString {};
16 |
17 | template
18 | struct IsString : IsString {};
19 | } // namespace ARDUINOJSON_NAMESPACE
20 |
21 | #include "ConstRamStringAdapter.hpp"
22 | #include "RamStringAdapter.hpp"
23 | #include "SizedRamStringAdapter.hpp"
24 |
25 | #if ARDUINOJSON_ENABLE_STD_STRING
26 | #include "StlStringAdapter.hpp"
27 | #endif
28 |
29 | #if ARDUINOJSON_ENABLE_ARDUINO_STRING
30 | #include "ArduinoStringAdapter.hpp"
31 | #endif
32 |
33 | #if ARDUINOJSON_ENABLE_PROGMEM
34 | #include "FlashStringAdapter.hpp"
35 | #include "SizedFlashStringAdapter.hpp"
36 | #endif
37 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Variant/SlotFunctions.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Memory/MemoryPool.hpp"
8 | #include "../Polyfills/assert.hpp"
9 | #include "../Strings/StringAdapters.hpp"
10 | #include "VariantData.hpp"
11 |
12 | namespace ARDUINOJSON_NAMESPACE {
13 |
14 | template
15 | inline bool slotSetKey(VariantSlot* var, TAdaptedString key, MemoryPool* pool) {
16 | if (!var) return false;
17 | if (key.isStatic()) {
18 | var->setLinkedKey(make_not_null(key.data()));
19 | } else {
20 | const char* dup = key.save(pool);
21 | if (!dup) return false;
22 | var->setOwnedKey(make_not_null(dup));
23 | }
24 | return true;
25 | }
26 |
27 | inline size_t slotSize(const VariantSlot* var) {
28 | size_t n = 0;
29 | while (var) {
30 | n++;
31 | var = var->next();
32 | }
33 | return n;
34 | }
35 |
36 | inline VariantData* slotData(VariantSlot* slot) {
37 | return reinterpret_cast(slot);
38 | }
39 | } // namespace ARDUINOJSON_NAMESPACE
40 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Variant/VariantAsImpl.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include "../Serialization/DynamicStringWriter.hpp"
8 | #include "VariantFunctions.hpp"
9 | #include "VariantRef.hpp"
10 |
11 | namespace ARDUINOJSON_NAMESPACE {
12 |
13 | template
14 | inline typename enable_if::value, T>::type variantAs(
15 | const VariantData* _data) {
16 | return ArrayConstRef(variantAsArray(_data));
17 | }
18 |
19 | template
20 | inline typename enable_if::value, T>::type variantAs(
21 | const VariantData* _data) {
22 | return ObjectConstRef(variantAsObject(_data));
23 | }
24 |
25 | template
26 | inline typename enable_if::value, T>::type
27 | variantAs(const VariantData* _data) {
28 | return VariantConstRef(_data);
29 | }
30 |
31 | template
32 | inline typename enable_if::value, T>::type variantAs(
33 | const VariantData* _data) {
34 | const char* cstr = _data != 0 ? _data->asString() : 0;
35 | if (cstr) return T(cstr);
36 | T s;
37 | serializeJson(VariantConstRef(_data), s);
38 | return s;
39 | }
40 |
41 | } // namespace ARDUINOJSON_NAMESPACE
42 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Variant/VariantContent.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #include // size_t
8 |
9 | #include "../Collection/CollectionData.hpp"
10 | #include "../Numbers/Float.hpp"
11 | #include "../Numbers/Integer.hpp"
12 |
13 | namespace ARDUINOJSON_NAMESPACE {
14 |
15 | //
16 | enum {
17 | VALUE_MASK = 0x7F,
18 |
19 | VALUE_IS_NULL = 0,
20 | VALUE_IS_LINKED_RAW = 0x01,
21 | VALUE_IS_OWNED_RAW = 0x02,
22 | VALUE_IS_LINKED_STRING = 0x03,
23 | VALUE_IS_OWNED_STRING = 0x04,
24 | VALUE_IS_BOOLEAN = 0x05,
25 | VALUE_IS_POSITIVE_INTEGER = 0x06,
26 | VALUE_IS_NEGATIVE_INTEGER = 0x07,
27 | VALUE_IS_FLOAT = 0x08,
28 |
29 | COLLECTION_MASK = 0x60,
30 | VALUE_IS_OBJECT = 0x20,
31 | VALUE_IS_ARRAY = 0x40,
32 |
33 | KEY_IS_OWNED = 0x80
34 | };
35 |
36 | struct RawData {
37 | const char *data;
38 | size_t size;
39 | };
40 |
41 | union VariantContent {
42 | Float asFloat;
43 | UInt asInteger;
44 | CollectionData asCollection;
45 | const char *asString;
46 | struct {
47 | const char *data;
48 | size_t size;
49 | } asRaw;
50 | };
51 | } // namespace ARDUINOJSON_NAMESPACE
52 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/Variant/VariantTo.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | namespace ARDUINOJSON_NAMESPACE {
8 | class ArrayRef;
9 | class ObjectRef;
10 | class VariantRef;
11 |
12 | // A metafunction that returns the type of the value returned by
13 | // VariantRef::to()
14 | template
15 | struct VariantTo {};
16 |
17 | template <>
18 | struct VariantTo {
19 | typedef ArrayRef type;
20 | };
21 | template <>
22 | struct VariantTo {
23 | typedef ObjectRef type;
24 | };
25 | template <>
26 | struct VariantTo {
27 | typedef VariantRef type;
28 | };
29 |
30 | } // namespace ARDUINOJSON_NAMESPACE
31 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/compatibility.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 | //
5 | // clang-format off
6 |
7 | #ifdef __GNUC__
8 |
9 | #define ARDUINOJSON_PRAGMA(x) _Pragma(#x)
10 |
11 | #define ARDUINOJSON_COMPILE_ERROR(msg) ARDUINOJSON_PRAGMA(GCC error msg)
12 |
13 | #define ARDUINOJSON_STRINGIFY(S) #S
14 |
15 | #define ARDUINOJSON_DEPRECATION_ERROR(X, Y) \
16 | ARDUINOJSON_COMPILE_ERROR(ARDUINOJSON_STRINGIFY(X is a Y from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6))
17 |
18 | #define StaticJsonBuffer ARDUINOJSON_DEPRECATION_ERROR(StaticJsonBuffer, class)
19 | #define DynamicJsonBuffer ARDUINOJSON_DEPRECATION_ERROR(DynamicJsonBuffer, class)
20 | #define JsonBuffer ARDUINOJSON_DEPRECATION_ERROR(JsonBuffer, class)
21 | #define RawJson ARDUINOJSON_DEPRECATION_ERROR(RawJson, function)
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/lib/ArduinoJson_ID64/src/ArduinoJson/version.hpp:
--------------------------------------------------------------------------------
1 | // ArduinoJson - arduinojson.org
2 | // Copyright Benoit Blanchon 2014-2019
3 | // MIT License
4 |
5 | #pragma once
6 |
7 | #define ARDUINOJSON_VERSION "6.11.0"
8 | #define ARDUINOJSON_VERSION_MAJOR 6
9 | #define ARDUINOJSON_VERSION_MINOR 11
10 | #define ARDUINOJSON_VERSION_REVISION 0
11 |
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/.library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "AsyncTCP",
3 | "description": "Asynchronous TCP Library for ESP32",
4 | "keywords": [
5 | "async",
6 | "tcp"
7 | ],
8 | "authors": [
9 | {
10 | "email": null,
11 | "url": null,
12 | "maintainer": true,
13 | "name": "Hristo Gochkov"
14 | }
15 | ],
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/me-no-dev/AsyncTCP.git"
19 | },
20 | "version": "1.0.3",
21 | "license": "LGPL-3.0",
22 | "frameworks": [
23 | "arduino"
24 | ],
25 | "platforms": [
26 | "espressif32"
27 | ],
28 | "build": {
29 | "libCompatMode": 2
30 | },
31 | "id": 1826
32 | }
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: bash
3 | os:
4 | - linux
5 |
6 | script:
7 | - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
8 | - sleep 3
9 | - export DISPLAY=:1.0
10 | - wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz
11 | - tar xf arduino-1.6.5-linux64.tar.xz
12 | - mv arduino-1.6.5 $HOME/arduino_ide
13 | - export PATH="$HOME/arduino_ide:$PATH"
14 | - which arduino
15 | - mkdir -p $HOME/Arduino/libraries
16 | - cp -r $TRAVIS_BUILD_DIR $HOME/Arduino/libraries/ESPAsyncTCP
17 | - cd $HOME/arduino_ide/hardware
18 | - mkdir esp8266com
19 | - cd esp8266com
20 | - git clone https://github.com/esp8266/Arduino.git esp8266
21 | - cd esp8266/tools
22 | - python get.py
23 | - source $TRAVIS_BUILD_DIR/travis/common.sh
24 | - arduino --board esp8266com:esp8266:generic --save-prefs
25 | - arduino --get-pref sketchbook.path
26 | - build_sketches arduino $HOME/Arduino/libraries/ESPAsyncTCP esp8266
27 |
28 | notifications:
29 | email:
30 | on_success: change
31 | on_failure: change
32 | webhooks:
33 | urls:
34 | - https://webhooks.gitter.im/e/60e65d0c78ea0a920347
35 | on_success: change # options: [always|never|change] default: always
36 | on_failure: always # options: [always|never|change] default: always
37 | on_start: false # default: false
38 |
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/README.md:
--------------------------------------------------------------------------------
1 | # AsyncTCP
2 | Async TCP Library for ESP32 Arduino
3 |
4 | [](https://gitter.im/me-no-dev/ESPAsyncWebServer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
5 |
6 | This is a fully asynchronous TCP library, aimed at enabling trouble-free, multi-connection network environment for Espressif's ESP32 MCUs.
7 |
8 | This library is the base for [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer)
9 |
10 | ## AsyncClient and AsyncServer
11 | The base classes on which everything else is built. They expose all possible scenarios, but are really raw and require more skills to use.
12 |
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/component.mk:
--------------------------------------------------------------------------------
1 | COMPONENT_ADD_INCLUDEDIRS := src
2 | COMPONENT_SRCDIRS := src
3 | CXXFLAGS += -fno-rtti
4 |
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"AsyncTCP",
3 | "description":"Asynchronous TCP Library for ESP32",
4 | "keywords":"async,tcp",
5 | "authors":
6 | {
7 | "name": "Hristo Gochkov",
8 | "maintainer": true
9 | },
10 | "repository":
11 | {
12 | "type": "git",
13 | "url": "https://github.com/me-no-dev/AsyncTCP.git"
14 | },
15 | "version": "1.0.3",
16 | "license": "LGPL-3.0",
17 | "frameworks": "arduino",
18 | "platforms": "espressif32",
19 | "build": {
20 | "libCompatMode": 2
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/library.properties:
--------------------------------------------------------------------------------
1 | name=AsyncTCP
2 | version=1.0.3
3 | author=Me-No-Dev
4 | maintainer=Me-No-Dev
5 | sentence=Async TCP Library for ESP32
6 | paragraph=Async TCP Library for ESP32
7 | category=Other
8 | url=https://github.com/me-no-dev/AsyncTCP
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/lib/AsyncTCP_ID1826/travis/common.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function build_sketches()
4 | {
5 | local arduino=$1
6 | local srcpath=$2
7 | local platform=$3
8 | local sketches=$(find $srcpath -name *.ino)
9 | for sketch in $sketches; do
10 | local sketchdir=$(dirname $sketch)
11 | if [[ -f "$sketchdir/.$platform.skip" ]]; then
12 | echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
13 | continue
14 | fi
15 | echo -e "\n\n ------------ Building $sketch ------------ \n\n";
16 | $arduino --verify $sketch;
17 | local result=$?
18 | if [ $result -ne 0 ]; then
19 | echo "Build failed ($1)"
20 | return $result
21 | fi
22 | done
23 | }
24 |
--------------------------------------------------------------------------------
/lib/DallasTemp/.gitignore:
--------------------------------------------------------------------------------
1 | .idea
2 | classes
3 | target
4 | out
5 | build
6 | *.iml
7 | *.ipr
8 | *.iws
9 | *.log
10 | *.war
11 | .idea
12 | .project
13 | .classpath
14 | .settings
15 | .gradle
16 | .vscode
17 |
--------------------------------------------------------------------------------
/lib/DallasTemp/examples/Multibus_simple/Multibus_simple.ino:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | OneWire ds18x20[] = { 3, 7 };
5 | const int oneWireCount = sizeof(ds18x20)/sizeof(OneWire);
6 | DallasTemperature sensor[oneWireCount];
7 |
8 | void setup(void) {
9 | // start serial port
10 | Serial.begin(9600);
11 | Serial.println("Dallas Temperature Multiple Bus Control Library Simple Demo");
12 | Serial.print("============Ready with ");
13 | Serial.print(oneWireCount);
14 | Serial.println(" Sensors================");
15 |
16 | // Start up the library on all defined bus-wires
17 | DeviceAddress deviceAddress;
18 | for (int i = 0; i < oneWireCount; i++) {;
19 | sensor[i].setOneWire(&ds18x20[i]);
20 | sensor[i].begin();
21 | if (sensor[i].getAddress(deviceAddress, 0)) sensor[i].setResolution(deviceAddress, 12);
22 | }
23 | }
24 |
25 | void loop(void) {
26 | // call sensors.requestTemperatures() to issue a global temperature
27 | // request to all devices on the bus
28 | Serial.print("Requesting temperatures...");
29 | for (int i = 0; i < oneWireCount; i++) {
30 | sensor[i].requestTemperatures();
31 | }
32 | Serial.println("DONE");
33 |
34 | delay(1000);
35 | for (int i = 0; i < oneWireCount; i++) {
36 | float temperature = sensor[i].getTempCByIndex(0);
37 | Serial.print("Temperature for the sensor ");
38 | Serial.print(i);
39 | Serial.print(" is ");
40 | Serial.println(temperature);
41 | }
42 | Serial.println();
43 | }
--------------------------------------------------------------------------------
/lib/DallasTemp/examples/SetUserData/SetUserData.ino:
--------------------------------------------------------------------------------
1 | //
2 | // This sketch does not use the ALARM registers and uses those 2 bytes as a counter
3 | // these 2 bytes can be used for other purposes as well e.g. last temperature or
4 | // a specific ID.
5 | //
6 |
7 | #include
8 | #include
9 |
10 | // Data wire is plugged into port 2 on the Arduino
11 | #define ONE_WIRE_BUS 2
12 |
13 | // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
14 | OneWire oneWire(ONE_WIRE_BUS);
15 |
16 | // Pass our oneWire reference to Dallas Temperature.
17 | DallasTemperature sensors(&oneWire);
18 |
19 | int count = 0;
20 |
21 | void setup(void)
22 | {
23 | // start serial port
24 | Serial.begin(9600);
25 | Serial.println("Dallas Temperature IC Control Library Demo");
26 |
27 | // Start up the library
28 | sensors.begin();
29 |
30 | }
31 |
32 | void loop(void)
33 | {
34 | // call sensors.requestTemperatures() to issue a global temperature
35 | // request to all devices on the bus
36 | Serial.print("Requesting temperatures...");
37 | sensors.requestTemperatures(); // Send the command to get temperatures
38 | Serial.println("DONE");
39 |
40 | Serial.print("Temperature for the device 1 (index 0) is: ");
41 | Serial.println(sensors.getTempCByIndex(0));
42 |
43 | count++;
44 | sensors.setUserDataByIndex(0, count);
45 | int x = sensors.getUserDataByIndex(0);
46 | Serial.println(count);
47 | }
48 |
--------------------------------------------------------------------------------
/lib/DallasTemp/examples/TwoPin_DS18B20/TwoPin_DS18B20.ino:
--------------------------------------------------------------------------------
1 | //
2 | // FILE: TwoPin_DS18B20.ino
3 | // AUTHOR: Rob Tillaart
4 | // VERSION: 0.1.00
5 | // PURPOSE: two pins for two sensors demo
6 | // DATE: 2014-06-13
7 | // URL: http://forum.arduino.cc/index.php?topic=216835.msg1764333#msg1764333
8 | //
9 | // Released to the public domain
10 | //
11 |
12 | #include
13 | #include
14 |
15 | #define ONE_WIRE_BUS_1 2
16 | #define ONE_WIRE_BUS_2 4
17 |
18 | OneWire oneWire_in(ONE_WIRE_BUS_1);
19 | OneWire oneWire_out(ONE_WIRE_BUS_2);
20 |
21 | DallasTemperature sensor_inhouse(&oneWire_in);
22 | DallasTemperature sensor_outhouse(&oneWire_out);
23 |
24 | void setup(void)
25 | {
26 | Serial.begin(9600);
27 | Serial.println("Dallas Temperature Control Library Demo - TwoPin_DS18B20");
28 |
29 | sensor_inhouse.begin();
30 | sensor_outhouse.begin();
31 | }
32 |
33 | void loop(void)
34 | {
35 | Serial.print("Requesting temperatures...");
36 | sensor_inhouse.requestTemperatures();
37 | sensor_outhouse.requestTemperatures();
38 | Serial.println(" done");
39 |
40 | Serial.print("Inhouse: ");
41 | Serial.println(sensor_inhouse.getTempCByIndex(0));
42 |
43 | Serial.print("Outhouse: ");
44 | Serial.println(sensor_outhouse.getTempCByIndex(0));
45 | }
--------------------------------------------------------------------------------
/lib/DallasTemp/keywords.txt:
--------------------------------------------------------------------------------
1 | #######################################
2 | # Syntax Coloring Map For DallasTemperature
3 | #######################################
4 |
5 | #######################################
6 | # Datatypes (KEYWORD1)
7 | #######################################
8 | DallasTemperature KEYWORD1
9 | OneWire KEYWORD1
10 | AlarmHandler KEYWORD1
11 | DeviceAddress KEYWORD1
12 |
13 | #######################################
14 | # Methods and Functions (KEYWORD2)
15 | #######################################
16 |
17 | setResolution KEYWORD2
18 | getResolution KEYWORD2
19 | getTempC KEYWORD2
20 | toFahrenheit KEYWORD2
21 | getTempF KEYWORD2
22 | getTempCByIndex KEYWORD2
23 | getTempFByIndex KEYWORD2
24 | setWaitForConversion KEYWORD2
25 | getWaitForConversion KEYWORD2
26 | requestTemperatures KEYWORD2
27 | requestTemperaturesByAddress KEYWORD2
28 | requestTemperaturesByIndex KEYWORD2
29 | isParasitePowerMode KEYWORD2
30 | begin KEYWORD2
31 | getDeviceCount KEYWORD2
32 | getAddress KEYWORD2
33 | validAddress KEYWORD2
34 | isConnected KEYWORD2
35 | readScratchPad KEYWORD2
36 | writeScratchPad KEYWORD2
37 | readPowerSupply KEYWORD2
38 | setHighAlarmTemp KEYWORD2
39 | setLowAlarmTemp KEYWORD2
40 | getHighAlarmTemp KEYWORD2
41 | getLowAlarmTemp KEYWORD2
42 | resetAlarmSearch KEYWORD2
43 | alarmSearch KEYWORD2
44 | hasAlarm KEYWORD2
45 | toCelsius KEYWORD2
46 | processAlarmss KEYWORD2
47 | setAlarmHandlers KEYWORD2
48 | defaultAlarmHandler KEYWORD2
49 | calculateTemperature KEYWORD2
50 |
51 | #######################################
52 | # Constants (LITERAL1)
53 | #######################################
54 |
55 |
--------------------------------------------------------------------------------
/lib/DallasTemp/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "DallasTemperature",
3 | "keywords": "onewire, 1-wire, bus, sensor, temperature",
4 | "description": "Arduino Library for Dallas Temperature ICs (DS18B20, DS18S20, DS1822, DS1820)",
5 | "repository":
6 | {
7 | "type": "git",
8 | "url": "https://github.com/milesburton/Arduino-Temperature-Control-Library.git"
9 | },
10 | "authors":
11 | [
12 | {
13 | "name": "Miles Burton",
14 | "email": "miles@mnetcs.com",
15 | "url": "http://www.milesburton.com",
16 | "maintainer": true
17 | },
18 | {
19 | "name": "Tim Newsome",
20 | "email": "nuisance@casualhacker.net"
21 | },
22 | {
23 | "name": "Guil Barros",
24 | "email": "gfbarros@bappos.com"
25 | },
26 | {
27 | "name": "Rob Tillaart",
28 | "email": "rob.tillaart@gmail.com"
29 | }
30 | ],
31 | "dependencies":
32 | {
33 | "name": "OneWire",
34 | "authors": "Paul Stoffregen",
35 | "frameworks": "arduino"
36 | },
37 | "version": "3.8.0",
38 | "frameworks": "arduino",
39 | "platforms": "*"
40 | }
41 |
--------------------------------------------------------------------------------
/lib/DallasTemp/library.properties:
--------------------------------------------------------------------------------
1 | name=DallasTemperature
2 | version=3.8.0
3 | author=Miles Burton , Tim Newsome , Guil Barros , Rob Tillaart
4 | maintainer=Miles Burton
5 | sentence=Arduino Library for Dallas Temperature ICs
6 | paragraph=Supports DS18B20, DS18S20, DS1822, DS1820
7 | category=Sensors
8 | url=https://github.com/milesburton/Arduino-Temperature-Control-Library
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/.library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ESP Async WebServer",
3 | "description": "Asynchronous HTTP and WebSocket Server Library for ESP8266 and ESP32",
4 | "keywords": [
5 | "http",
6 | "async",
7 | "websocket",
8 | "webserver"
9 | ],
10 | "authors": [
11 | {
12 | "email": null,
13 | "url": null,
14 | "maintainer": true,
15 | "name": "Hristo Gochkov"
16 | }
17 | ],
18 | "repository": {
19 | "type": "git",
20 | "url": "https://github.com/me-no-dev/ESPAsyncWebServer.git"
21 | },
22 | "version": "1.2.0",
23 | "license": "LGPL-3.0",
24 | "frameworks": [
25 | "arduino"
26 | ],
27 | "platforms": [
28 | "espressif8266",
29 | "espressif32"
30 | ],
31 | "dependencies": [
32 | {
33 | "name": "ESPAsyncTCP",
34 | "platforms": "espressif8266"
35 | },
36 | {
37 | "name": "AsyncTCP",
38 | "platforms": "espressif32"
39 | }
40 | ],
41 | "id": 306
42 | }
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/component.mk:
--------------------------------------------------------------------------------
1 | COMPONENT_ADD_INCLUDEDIRS := src
2 | COMPONENT_SRCDIRS := src
3 | CXXFLAGS += -fno-rtti
4 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/.esp31b.skip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/.esp31b.skip
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/.exclude.files:
--------------------------------------------------------------------------------
1 | /*.js.gz
2 | /.exclude.files
3 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/ace.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/ace.js.gz
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/ext-searchbox.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/ext-searchbox.js.gz
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/favicon.ico
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/mode-css.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/mode-css.js.gz
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/mode-html.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/mode-html.js.gz
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/mode-javascript.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/mode-javascript.js.gz
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/worker-html.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESP Async WebServer_ID306/examples/ESP_AsyncFSBrowser/data/worker-html.js.gz
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/keywords.txt:
--------------------------------------------------------------------------------
1 | JsonArray KEYWORD1
2 | add KEYWORD2
3 | createArray KEYWORD3
4 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"ESP Async WebServer",
3 | "description":"Asynchronous HTTP and WebSocket Server Library for ESP8266 and ESP32",
4 | "keywords":"http,async,websocket,webserver",
5 | "authors":
6 | {
7 | "name": "Hristo Gochkov",
8 | "maintainer": true
9 | },
10 | "repository":
11 | {
12 | "type": "git",
13 | "url": "https://github.com/me-no-dev/ESPAsyncWebServer.git"
14 | },
15 | "version": "1.2.0",
16 | "license": "LGPL-3.0",
17 | "frameworks": "arduino",
18 | "platforms": ["espressif8266", "espressif32"],
19 | "dependencies": [
20 | {
21 | "name": "ESPAsyncTCP",
22 | "platforms": "espressif8266"
23 | },
24 | {
25 | "name": "AsyncTCP",
26 | "platforms": "espressif32"
27 | }
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/library.properties:
--------------------------------------------------------------------------------
1 | name=ESP Async WebServer
2 | version=1.2.0
3 | author=Me-No-Dev
4 | maintainer=Me-No-Dev
5 | sentence=Async Web Server for ESP8266 and ESP31B
6 | paragraph=Async Web Server for ESP8266 and ESP31B
7 | category=Other
8 | url=https://github.com/me-no-dev/ESPAsyncWebServer
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/src/SPIFFSEditor.h:
--------------------------------------------------------------------------------
1 | #ifndef SPIFFSEditor_H_
2 | #define SPIFFSEditor_H_
3 | #include
4 |
5 | class SPIFFSEditor : public AsyncWebHandler
6 | {
7 | private:
8 | fs::FS _fs;
9 | String _username;
10 | String _password;
11 | bool _authenticated;
12 | uint32_t _startTime;
13 |
14 | public:
15 | #ifdef ESP32
16 | SPIFFSEditor(const fs::FS &fs, const String &username = String(), const String &password = String());
17 | #else
18 | SPIFFSEditor(const String &username = String(), const String &password = String(), const fs::FS &fs = SPIFFS);
19 | #endif
20 | virtual bool canHandle(AsyncWebServerRequest *request) override final;
21 | virtual void handleRequest(AsyncWebServerRequest *request) override final;
22 | virtual void handleUpload(AsyncWebServerRequest *request, const String &filename, size_t index, uint8_t *data, size_t len, bool final) override final;
23 | virtual bool isRequestHandlerTrivial() override final { return false; }
24 | };
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/lib/ESP Async WebServer_ID306/travis/common.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function build_sketches()
4 | {
5 | local arduino=$1
6 | local srcpath=$2
7 | local platform=$3
8 | local sketches=$(find $srcpath -name *.ino)
9 | for sketch in $sketches; do
10 | local sketchdir=$(dirname $sketch)
11 | if [[ -f "$sketchdir/.$platform.skip" ]]; then
12 | echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
13 | continue
14 | fi
15 | echo -e "\n\n ------------ Building $sketch ------------ \n\n";
16 | $arduino --verify $sketch;
17 | local result=$?
18 | if [ $result -ne 0 ]; then
19 | echo "Build failed ($1)"
20 | return $result
21 | fi
22 | done
23 | }
24 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | .DS_Store
3 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/.library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ESPAsyncTCP",
3 | "description": "Asynchronous TCP Library for ESP8266",
4 | "keywords": [
5 | "async",
6 | "tcp"
7 | ],
8 | "authors": [
9 | {
10 | "email": null,
11 | "url": null,
12 | "maintainer": true,
13 | "name": "Hristo Gochkov"
14 | }
15 | ],
16 | "repository": {
17 | "type": "git",
18 | "url": "https://github.com/me-no-dev/ESPAsyncTCP.git"
19 | },
20 | "version": "1.2.0",
21 | "license": "LGPL-3.0",
22 | "frameworks": [
23 | "arduino"
24 | ],
25 | "platforms": [
26 | "espressif8266"
27 | ],
28 | "build": {
29 | "libCompatMode": 2
30 | },
31 | "id": 305
32 | }
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/.travis.yml:
--------------------------------------------------------------------------------
1 | sudo: false
2 | language: bash
3 | os:
4 | - linux
5 |
6 | script:
7 | - /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16
8 | - sleep 3
9 | - export DISPLAY=:1.0
10 | - wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz
11 | - tar xf arduino-1.6.5-linux64.tar.xz
12 | - mv arduino-1.6.5 $HOME/arduino_ide
13 | - export PATH="$HOME/arduino_ide:$PATH"
14 | - which arduino
15 | - mkdir -p $HOME/Arduino/libraries
16 | - cp -r $TRAVIS_BUILD_DIR $HOME/Arduino/libraries/ESPAsyncTCP
17 | - cd $HOME/arduino_ide/hardware
18 | - mkdir esp8266com
19 | - cd esp8266com
20 | - git clone https://github.com/esp8266/Arduino.git esp8266
21 | - cd esp8266/tools
22 | - python get.py
23 | - source $TRAVIS_BUILD_DIR/travis/common.sh
24 | - arduino --board esp8266com:esp8266:generic --save-prefs
25 | - arduino --get-pref sketchbook.path
26 | - build_sketches arduino $HOME/Arduino/libraries/ESPAsyncTCP esp8266
27 |
28 | notifications:
29 | email:
30 | on_success: change
31 | on_failure: change
32 | webhooks:
33 | urls:
34 | - https://webhooks.gitter.im/e/60e65d0c78ea0a920347
35 | on_success: change # options: [always|never|change] default: always
36 | on_failure: always # options: [always|never|change] default: always
37 | on_start: false # default: false
38 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/examples/ClientServer/Client/config.h:
--------------------------------------------------------------------------------
1 | #ifndef CONFIG_H
2 | #define CONFIG_H
3 |
4 | /*
5 | * This example demonstrate how to use asynchronous client & server APIs
6 | * in order to establish tcp socket connections in client server manner.
7 | * server is running (on port 7050) on one ESP, acts as AP, and other clients running on
8 | * remaining ESPs acts as STAs. after connection establishment between server and clients
9 | * there is a simple message transfer in every 2s. clients connect to server via it's host name
10 | * (in this case 'esp_server') with help of DNS service running on server side.
11 | *
12 | * Note: default MSS for ESPAsyncTCP is 536 byte and defualt ACK timeout is 5s.
13 | */
14 |
15 | #define SSID "ESP-TEST"
16 | #define PASSWORD "123456789"
17 |
18 | #define SERVER_HOST_NAME "esp_server"
19 |
20 | #define TCP_PORT 7050
21 | #define DNS_PORT 53
22 |
23 | #endif // CONFIG_H
24 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/examples/ClientServer/Server/config.h:
--------------------------------------------------------------------------------
1 | #ifndef CONFIG_H
2 | #define CONFIG_H
3 |
4 | /*
5 | * This example demonstrate how to use asynchronous client & server APIs
6 | * in order to establish tcp socket connections in client server manner.
7 | * server is running (on port 7050) on one ESP, acts as AP, and other clients running on
8 | * remaining ESPs acts as STAs. after connection establishment between server and clients
9 | * there is a simple message transfer in every 2s. clients connect to server via it's host name
10 | * (in this case 'esp_server') with help of DNS service running on server side.
11 | *
12 | * Note: default MSS for ESPAsyncTCP is 536 byte and defualt ACK timeout is 5s.
13 | */
14 |
15 | #define SSID "ESP-TEST"
16 | #define PASSWORD "123456789"
17 |
18 | #define SERVER_HOST_NAME "esp_server"
19 |
20 | #define TCP_PORT 7050
21 | #define DNS_PORT 53
22 |
23 | #endif // CONFIG_H
24 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/examples/SyncClient/.esp31b.skip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESPAsyncTCP_ID305/examples/SyncClient/.esp31b.skip
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/examples/SyncClient/SyncClient.ino:
--------------------------------------------------------------------------------
1 | #ifdef ESP8266
2 | #include
3 | #include
4 | #include
5 | #else
6 | #include
7 | #endif
8 | #include "ESPAsyncTCP.h"
9 | #include "SyncClient.h"
10 |
11 | const char* ssid = "**********";
12 | const char* password = "************";
13 |
14 | void setup(){
15 | Serial.begin(115200);
16 | WiFi.begin(ssid, password);
17 | if (WiFi.waitForConnectResult() != WL_CONNECTED) {
18 | Serial.printf("WiFi Failed!\n");
19 | return;
20 | }
21 | Serial.printf("WiFi Connected!\n");
22 | Serial.println(WiFi.localIP());
23 | #ifdef ESP8266
24 | ArduinoOTA.begin();
25 | #endif
26 |
27 | SyncClient client;
28 | if(!client.connect("www.google.com", 80)){
29 | Serial.println("Connect Failed");
30 | return;
31 | }
32 | client.setTimeout(2);
33 | if(client.printf("GET / HTTP/1.1\r\nHost: www.google.com\r\nConnection: close\r\n\r\n") > 0){
34 | while(client.connected() && client.available() == 0){
35 | delay(1);
36 | }
37 | while(client.available()){
38 | Serial.write(client.read());
39 | }
40 | if(client.connected()){
41 | client.stop();
42 | }
43 | } else {
44 | client.stop();
45 | Serial.println("Send Failed");
46 | while(client.connected()) delay(0);
47 | }
48 | }
49 |
50 | void loop(){
51 | #ifdef ESP8266
52 | ArduinoOTA.handle();
53 | #endif
54 | }
55 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"ESPAsyncTCP",
3 | "description":"Asynchronous TCP Library for ESP8266",
4 | "keywords":"async,tcp",
5 | "authors":
6 | {
7 | "name": "Hristo Gochkov",
8 | "maintainer": true
9 | },
10 | "repository":
11 | {
12 | "type": "git",
13 | "url": "https://github.com/me-no-dev/ESPAsyncTCP.git"
14 | },
15 | "version": "1.2.0",
16 | "license": "LGPL-3.0",
17 | "frameworks": "arduino",
18 | "platforms": "espressif8266",
19 | "build": {
20 | "libCompatMode": 2
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/library.properties:
--------------------------------------------------------------------------------
1 | name=ESP AsyncTCP
2 | version=1.2.0
3 | author=Me-No-Dev
4 | maintainer=Me-No-Dev
5 | sentence=Async TCP Library for ESP8266 and ESP31B
6 | paragraph=Async TCP Library for ESP8266 and ESP31B
7 | category=Other
8 | url=https://github.com/me-no-dev/ESPAsyncTCP
9 | architectures=*
10 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/src/async_config.h:
--------------------------------------------------------------------------------
1 | #ifndef LIBRARIES_ESPASYNCTCP_SRC_ASYNC_CONFIG_H_
2 | #define LIBRARIES_ESPASYNCTCP_SRC_ASYNC_CONFIG_H_
3 |
4 | #ifndef ASYNC_TCP_SSL_ENABLED
5 | #define ASYNC_TCP_SSL_ENABLED 0
6 | #endif
7 |
8 | #define ASYNC_TCP_DEBUG(...) //ets_printf(__VA_ARGS__)
9 | #define TCP_SSL_DEBUG(...) //ets_printf(__VA_ARGS__)
10 |
11 | #endif /* LIBRARIES_ESPASYNCTCP_SRC_ASYNC_CONFIG_H_ */
12 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/ssl/gen_server_cert.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | cat > ca_cert.conf << EOF
4 | [ req ]
5 | distinguished_name = req_distinguished_name
6 | prompt = no
7 |
8 | [ req_distinguished_name ]
9 | O = Espressif Systems
10 | EOF
11 |
12 | openssl genrsa -out axTLS.ca_key.pem 2048
13 | openssl req -new -config ./ca_cert.conf -key axTLS.ca_key.pem -out axTLS.ca_x509.req
14 | openssl x509 -req -sha1 -days 5000 -signkey axTLS.ca_key.pem -CAkey axTLS.ca_key.pem -in axTLS.ca_x509.req -out axTLS.ca_x509.pem
15 |
16 | cat > certs.conf << EOF
17 | [ req ]
18 | distinguished_name = req_distinguished_name
19 | prompt = no
20 |
21 | [ req_distinguished_name ]
22 | O = axTLS on ESP8266
23 | CN = esp8266.local
24 | EOF
25 |
26 | openssl genrsa -out axTLS.key_1024.pem 1024
27 | openssl req -new -config ./certs.conf -key axTLS.key_1024.pem -out axTLS.x509_1024.req
28 | openssl x509 -req -sha1 -CAcreateserial -days 5000 -CA axTLS.ca_x509.pem -CAkey axTLS.ca_key.pem -in axTLS.x509_1024.req -out axTLS.x509_1024.pem
29 |
30 | openssl rsa -outform DER -in axTLS.key_1024.pem -out axTLS.key_1024
31 | openssl x509 -outform DER -in axTLS.x509_1024.pem -out axTLS.x509_1024.cer
32 |
33 | cat axTLS.key_1024 > server.key
34 | cat axTLS.x509_1024.cer > server.cer
35 |
36 | rm axTLS.* ca_cert.conf certs.conf
37 |
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/ssl/server.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESPAsyncTCP_ID305/ssl/server.cer
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/ssl/server.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/uncodead/BrewUNO/f895a56c0af6b048f1ecd24e9000a6d0eda910ec/lib/ESPAsyncTCP_ID305/ssl/server.key
--------------------------------------------------------------------------------
/lib/ESPAsyncTCP_ID305/travis/common.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | function build_sketches()
4 | {
5 | local arduino=$1
6 | local srcpath=$2
7 | local platform=$3
8 | local sketches=$(find $srcpath -name *.ino)
9 | for sketch in $sketches; do
10 | local sketchdir=$(dirname $sketch)
11 | if [[ -f "$sketchdir/.$platform.skip" ]]; then
12 | echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
13 | continue
14 | fi
15 | echo -e "\n\n ------------ Building $sketch ------------ \n\n";
16 | $arduino --verify $sketch;
17 | local result=$?
18 | if [ $result -ne 0 ]; then
19 | echo "Build failed ($1)"
20 | return $result
21 | fi
22 | done
23 | }
24 |
--------------------------------------------------------------------------------
/lib/LiquidCrystal_I2C_ID576/.library.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "LiquidCrystal_I2C",
3 | "version": "1.1.4",
4 | "keywords": [
5 | "display"
6 | ],
7 | "description": "A library for I2C LCD displays.",
8 | "frameworks": [
9 | "arduino"
10 | ],
11 | "platforms": [
12 | "atmelavr"
13 | ],
14 | "authors": [
15 | {
16 | "email": null,
17 | "url": null,
18 | "maintainer": false,
19 | "name": "Frank de Brabander"
20 | },
21 | {
22 | "email": "marcolivier.schwartz@gmail.com",
23 | "url": null,
24 | "maintainer": true,
25 | "name": "Marco Schwartz"
26 | }
27 | ],
28 | "repository": {
29 | "type": "git",
30 | "url": "https://github.com/marcoschwartz/LiquidCrystal_I2C"
31 | },
32 | "homepage": null,
33 | "export": {
34 | "include": null,
35 | "exclude": [
36 | "extras",
37 | "docs",
38 | "tests",
39 | "test",
40 | "*.doxyfile",
41 | "*.pdf"
42 | ]
43 | },
44 | "id": 576
45 | }
--------------------------------------------------------------------------------
/lib/LiquidCrystal_I2C_ID576/README.md:
--------------------------------------------------------------------------------
1 | # LiquidCrystal_I2C
2 |
3 | LiquidCrystal Arduino library for the DFRobot I2C LCD displays
4 |
5 | **This library is no longer actively maintained, I only put it here so everyone can access it via the Arduino library manger. If you would like to take the role of the maintainer/owner of the library, please send me a message!**
6 |
--------------------------------------------------------------------------------
/lib/LiquidCrystal_I2C_ID576/examples/HelloWorld/HelloWorld.pde:
--------------------------------------------------------------------------------
1 | //YWROBOT
2 | //Compatible with the Arduino IDE 1.0
3 | //Library version:1.1
4 | #include