Generalize the use of JSON_MSG_BUFFER (#1114)

* Generalize the use of JSON_MSG_BUFFER

instead of calculated buffer
This commit is contained in:
Florian authored and GitHub committed 2021-12-20 19:37:06 -06:00
1 parent afd7a96537
commit 66ce0d5a41
6 files changed
+10 -28

No files matched your search

+1 -6
View File
@@ -127,12 +127,7 @@ void setupRF() {
void RFtoMQTT() {
if (mySwitch.available()) {
# ifdef ZradioCC1101 //receiving with CC1101
const int JSON_MSG_CALC_BUFFER = JSON_OBJECT_SIZE(8);
# else
const int JSON_MSG_CALC_BUFFER = JSON_OBJECT_SIZE(7);
# endif
StaticJsonDocument<JSON_MSG_CALC_BUFFER> jsonBuffer;
StaticJsonDocument<JSON_MSG_BUFFER> jsonBuffer;
JsonObject RFdata = jsonBuffer.to<JsonObject>();
Log.trace(F("Rcv. RF" CR));
# ifdef ESP32