1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-24 19:42:27 +03:00

- Move all Strings to flash and optimize String usage, saving 4-5 kB of RAM.

- Replace const with constexpr where possible.

- Use default constructor instead of copy constructor for IPAddress variable initialization.

- Add MeshTypeConversionFunctions namespace around TypeConversionFunctions.

- Add MeshUtilityFunctions namespace around UtilityFunctions.

- Add ESP8266WIFIMESH_DISABLE_COMPATIBILITY preprocessor flag to retain compatibility with old code despite new namespaces.

- Add setLogEntryLifetimeMs and setBroadcastResponseTimeoutMs methods to EspnowMeshBackend.

- Move FloodingMesh constant definitions from header to .cpp file to reduce the risk of extra RAM consumption.

- Add deactivateAP method to FloodingMesh.

- Make deactivateAP static and add new non-static deactivateControlledAP method to MeshBackendBase.

- Add example of how to transfer null values using multiStrings to HelloEspnow.ino.

- Improve documentation.

- Improve comments.
This commit is contained in:
Anders
2019-12-21 16:53:18 +01:00
parent 962a23d253
commit a49f047096
27 changed files with 814 additions and 677 deletions

View File

@ -29,18 +29,18 @@
namespace JsonTranslator
{
const String jsonConnectionState = "{\"connectionState\":{";
const String jsonPassword = "\"password\":";
const String jsonOwnSessionKey = "\"ownSK\":";
const String jsonPeerSessionKey = "\"peerSK\":";
const String jsonPeerStaMac = "\"peerStaMac\":";
const String jsonPeerApMac = "\"peerApMac\":";
const String jsonDuration = "\"duration\":";
const String jsonNonce = "\"nonce\":";
const String jsonHmac = "\"hmac\":";
const String jsonDesync = "\"desync\":";
const String jsonUnsynchronizedMessageID = "\"unsyncMsgID\":";
const String jsonMeshMessageCount = "\"meshMsgCount\":";
constexpr char jsonConnectionState[] PROGMEM = "{\"connectionState\":{";
constexpr char jsonPassword[] PROGMEM = "\"password\":";
constexpr char jsonOwnSessionKey[] PROGMEM = "\"ownSK\":";
constexpr char jsonPeerSessionKey[] PROGMEM = "\"peerSK\":";
constexpr char jsonPeerStaMac[] PROGMEM = "\"peerStaMac\":";
constexpr char jsonPeerApMac[] PROGMEM = "\"peerApMac\":";
constexpr char jsonDuration[] PROGMEM = "\"duration\":";
constexpr char jsonNonce[] PROGMEM = "\"nonce\":";
constexpr char jsonHmac[] PROGMEM = "\"hmac\":";
constexpr char jsonDesync[] PROGMEM = "\"desync\":";
constexpr char jsonUnsynchronizedMessageID[] PROGMEM = "\"unsyncMsgID\":";
constexpr char jsonMeshMessageCount[] PROGMEM = "\"meshMsgCount\":";
String createJsonPair(const String &valueIdentifier, const String &value);
String createJsonEndPair(const String &valueIdentifier, const String &value);